1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2008 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17 <com.android.deskclock.widget.swipeablelistview.SwipeLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 android:id="@+id/alarm_item" 20 android:layout_width="match_parent" 21 android:layout_height="wrap_content" 22 android:orientation="vertical" 23 android:gravity="center_horizontal|top" 24 android:background="@color/alarm_whiteish"> 25 26 <LinearLayout 27 android:layout_width="match_parent" 28 android:layout_height="wrap_content" 29 android:layout_marginLeft="12dp" 30 android:layout_marginRight="8dp" 31 android:layout_marginTop="12dp" 32 android:layout_marginBottom="12dp" 33 android:orientation="horizontal"> 34 <com.android.deskclock.DigitalClock 35 android:id="@+id/digital_clock" 36 android:layout_width="wrap_content" 37 android:layout_height="wrap_content" 38 android:gravity="top" 39 android:baselineAligned="false" 40 android:clickable="true" 41 android:background="@drawable/item_background"> 42 <com.android.deskclock.ZeroTopPaddingTextView 43 android:id="@+id/timeDisplayHours" 44 android:layout_width="wrap_content" 45 android:layout_height="wrap_content" 46 android:paddingRight="@dimen/time_margin_right" 47 android:singleLine="true" 48 android:ellipsize="none" 49 style="@style/small_bold" 50 android:textColor="@color/clock_white"/> 51 <com.android.deskclock.ZeroTopPaddingTextView 52 android:id="@+id/timeDisplayMinutes" 53 android:layout_width="wrap_content" 54 android:layout_height="wrap_content" 55 style="@style/small_light" 56 android:singleLine="true" 57 android:ellipsize="none" 58 android:textColor="@color/clock_white" /> 59 <com.android.deskclock.ZeroTopPaddingTextView 60 android:id="@+id/am_pm" 61 android:layout_height="wrap_content" 62 android:layout_width="wrap_content" 63 style="@style/label" 64 android:singleLine="true" 65 android:ellipsize="none" 66 android:layout_gravity="top" 67 android:textColor="@color/clock_white"/> 68 </com.android.deskclock.DigitalClock> 69 <Space 70 android:layout_height="match_parent" 71 android:layout_width="0dip" 72 android:layout_weight="1"/> 73 <Switch 74 android:layout_width="wrap_content" 75 android:layout_height="match_parent" 76 android:id="@+id/onoff" 77 android:textOn="@string/alarm_on" 78 android:textOff="@string/alarm_off" 79 android:thumbTextPadding="10dp" 80 android:layout_gravity="center_vertical|right"/> 81 </LinearLayout> 82 <View 83 android:id="@+id/hairline" 84 android:layout_width="match_parent" 85 android:layout_height="1dp" 86 android:layout_marginLeft="8dp" 87 android:layout_marginRight="8dp" 88 android:background="#28ffffff"/> 89 <FrameLayout 90 android:id="@+id/info_area" 91 android:layout_width="match_parent" 92 android:layout_height="32dp" 93 android:paddingLeft="16dp" 94 android:gravity="center_vertical" 95 android:clickable="true" 96 android:background="@drawable/item_background"> 97 <com.android.deskclock.widget.EllipsizeLayout 98 android:layout_width="match_parent" 99 android:layout_height="match_parent" 100 android:layout_marginRight="48dp" 101 android:gravity="center_vertical" 102 > 103 <TextView android:id="@+id/label" 104 android:layout_width="wrap_content" 105 android:layout_height="wrap_content" 106 style="@style/alarm_label_not_caps" 107 android:textColor="@color/clock_gray" 108 android:ellipsize="end" 109 android:singleLine="true"/> 110 <TextView android:id="@+id/daysOfWeek" 111 android:layout_height="wrap_content" 112 android:layout_width="wrap_content" 113 style="@style/alarm_label_bold" 114 android:textColor="@color/clock_white" 115 android:ellipsize="none" 116 android:singleLine="true"/> 117 </com.android.deskclock.widget.EllipsizeLayout> 118 <ImageView 119 android:id="@+id/expand" 120 android:layout_width="48dp" 121 android:layout_height="32dp" 122 android:contentDescription="@string/expand_alarm" 123 android:src="@drawable/ic_expand_down" 124 android:layout_gravity="right" 125 /> 126 </FrameLayout> 127 <LinearLayout 128 android:id="@+id/expand_area" 129 android:orientation="vertical" 130 android:layout_width="match_parent" 131 android:layout_height="wrap_content" 132 android:visibility="gone"> 133 134 <TextView 135 android:id="@+id/edit_label" 136 style="@style/body_not_caps" 137 android:gravity="center_vertical" 138 android:textColor="@color/clock_gray" 139 android:hint="@string/label" 140 android:layout_width="wrap_content" 141 android:layout_height="64dp" 142 android:layout_marginLeft="16dp" 143 android:layout_marginRight="16dp" 144 android:ellipsize="end" 145 android:singleLine="true" 146 android:background="@drawable/item_background"/> 147 <CheckBox 148 android:id="@+id/repeat_onoff" 149 android:text="@string/alarm_repeat" 150 android:layout_height="48dp" 151 android:layout_width="wrap_content" 152 android:layout_marginLeft="10dp" 153 android:layout_marginRight="16dp" 154 android:layout_gravity="center_vertical" 155 style="@style/body" 156 android:textColor="@color/clock_white"/> 157 <LinearLayout 158 android:id="@+id/repeat_days" 159 android:layout_width="match_parent" 160 android:layout_height="48dp" 161 android:layout_marginLeft="10dp" 162 android:layout_marginRight="10dp" 163 android:layout_gravity="top" 164 android:orientation="horizontal" 165 android:visibility="gone"> 166 <!-- Day buttons are put here programatically --> 167 </LinearLayout> 168 <LinearLayout 169 android:layout_width="match_parent" 170 android:layout_height="64dp" 171 android:layout_marginLeft="10dp" 172 android:layout_marginRight="16dp" 173 android:gravity="center_vertical"> 174 175 <TextView 176 android:id="@+id/choose_ringtone" 177 android:layout_height="match_parent" 178 android:layout_width="0dp" 179 android:layout_weight="1" 180 android:layout_marginRight="16dp" 181 android:gravity="center_vertical" 182 style="@style/body" 183 android:background="@drawable/item_background" 184 android:clickable="true" 185 android:textColor="@color/clock_white" 186 android:ellipsize="marquee" 187 android:scrollHorizontally="true" 188 android:singleLine="true" 189 android:marqueeRepeatLimit="marquee_forever" 190 android:drawableLeft="@drawable/ic_ringtone" 191 android:drawablePadding="2dp" 192 /> 193 <CheckBox 194 android:id="@+id/vibrate_onoff" 195 android:text="@string/alarm_vibrate" 196 android:includeFontPadding="false" 197 android:textColor="@color/clock_gray" 198 android:layout_height="wrap_content" 199 android:layout_width="wrap_content" 200 android:layout_gravity="center_vertical|right" 201 style="@style/body"/> 202 </LinearLayout> 203 <View 204 android:id="@+id/hairline" 205 android:layout_height="1dp" 206 android:layout_marginLeft="8dp" 207 android:layout_marginRight="8dp" 208 android:layout_width="match_parent" 209 android:background="#28ffffff"/> 210 <FrameLayout 211 android:id="@+id/collapse" 212 android:layout_width="match_parent" 213 android:layout_height="32dp" 214 android:background="@drawable/item_background" 215 android:clickable="true" 216 android:contentDescription="@string/collapse_alarm" 217 > 218 <ImageView 219 android:layout_width="48dp" 220 android:layout_height="32dp" 221 android:src="@drawable/ic_expand_up" 222 android:layout_gravity="right"/> 223 </FrameLayout> 224 </LinearLayout> 225 </com.android.deskclock.widget.swipeablelistview.SwipeLayout> 226