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_marginStart="12dp" 31 android:layout_marginRight="8dp" 32 android:layout_marginEnd="8dp" 33 android:layout_marginTop="12dp" 34 android:layout_marginBottom="12dp" 35 android:orientation="horizontal"> 36 <com.android.deskclock.DigitalClock 37 android:id="@+id/digital_clock" 38 android:layout_width="wrap_content" 39 android:layout_height="wrap_content" 40 android:gravity="top" 41 android:baselineAligned="false" 42 android:clickable="true" 43 android:layoutDirection="ltr" 44 android:background="@drawable/item_background"> 45 <com.android.deskclock.ZeroTopPaddingTextView 46 android:id="@+id/timeDisplayHours" 47 android:layout_width="wrap_content" 48 android:layout_height="wrap_content" 49 android:paddingRight="@dimen/time_margin_right" 50 android:paddingEnd="@dimen/time_margin_right" 51 android:singleLine="true" 52 android:ellipsize="none" 53 style="@style/small_bold" 54 android:textColor="@color/clock_white"/> 55 <com.android.deskclock.ZeroTopPaddingTextView 56 android:id="@+id/timeDisplayMinutes" 57 android:layout_width="wrap_content" 58 android:layout_height="wrap_content" 59 style="@style/small_light" 60 android:singleLine="true" 61 android:ellipsize="none" 62 android:textColor="@color/clock_white" /> 63 <com.android.deskclock.ZeroTopPaddingTextView 64 android:id="@+id/am_pm" 65 android:layout_height="wrap_content" 66 android:layout_width="wrap_content" 67 style="@style/label" 68 android:singleLine="true" 69 android:ellipsize="none" 70 android:layout_gravity="top" 71 android:textColor="@color/clock_white"/> 72 </com.android.deskclock.DigitalClock> 73 <Space 74 android:layout_height="match_parent" 75 android:layout_width="0dip" 76 android:layout_weight="1"/> 77 <Switch 78 android:layout_width="wrap_content" 79 android:layout_height="match_parent" 80 android:id="@+id/onoff" 81 android:thumbTextPadding="10dp" 82 android:layout_gravity="center_vertical|end"/> 83 </LinearLayout> 84 <View 85 android:id="@+id/hairline" 86 android:layout_width="match_parent" 87 android:layout_height="1dp" 88 android:layout_marginLeft="8dp" 89 android:layout_marginStart="8dp" 90 android:layout_marginRight="8dp" 91 android:layout_marginEnd="8dp" 92 android:background="#28ffffff"/> 93 <FrameLayout 94 android:id="@+id/info_area" 95 android:layout_width="match_parent" 96 android:layout_height="32dp" 97 android:paddingLeft="16dp" 98 android:paddingStart="16dp" 99 android:gravity="center_vertical" 100 android:clickable="true" 101 android:background="@drawable/item_background"> 102 <com.android.deskclock.widget.EllipsizeLayout 103 android:layout_width="match_parent" 104 android:layout_height="match_parent" 105 android:layout_marginRight="48dp" 106 android:layout_marginEnd="48dp" 107 android:gravity="center_vertical" 108 > 109 <TextView android:id="@+id/label" 110 android:layout_width="wrap_content" 111 android:layout_height="wrap_content" 112 style="@style/alarm_label_not_caps" 113 android:textColor="@color/clock_gray" 114 android:ellipsize="end" 115 android:singleLine="true"/> 116 <TextView android:id="@+id/daysOfWeek" 117 android:layout_height="wrap_content" 118 android:layout_width="wrap_content" 119 style="@style/alarm_label_bold" 120 android:textColor="@color/clock_white" 121 android:ellipsize="none" 122 android:singleLine="true"/> 123 </com.android.deskclock.widget.EllipsizeLayout> 124 <ImageView 125 android:id="@+id/expand" 126 android:layout_width="48dp" 127 android:layout_height="32dp" 128 android:contentDescription="@string/expand_alarm" 129 android:src="@drawable/ic_expand_down" 130 android:layout_gravity="end" 131 /> 132 </FrameLayout> 133 <LinearLayout 134 android:id="@+id/expand_area" 135 android:orientation="vertical" 136 android:layout_width="match_parent" 137 android:layout_height="wrap_content" 138 android:visibility="gone"> 139 140 <TextView 141 android:id="@+id/edit_label" 142 style="@style/body_not_caps" 143 android:gravity="center_vertical" 144 android:textColor="@color/clock_gray" 145 android:hint="@string/label" 146 android:layout_width="wrap_content" 147 android:layout_height="64dp" 148 android:layout_marginLeft="16dp" 149 android:layout_marginStart="16dp" 150 android:layout_marginRight="16dp" 151 android:layout_marginEnd="16dp" 152 android:ellipsize="end" 153 android:singleLine="true" 154 android:background="@drawable/item_background"/> 155 <CheckBox 156 android:id="@+id/repeat_onoff" 157 android:text="@string/alarm_repeat" 158 android:layout_height="48dp" 159 android:layout_width="wrap_content" 160 android:layout_marginLeft="10dp" 161 android:layout_marginStart="10dp" 162 android:layout_marginRight="16dp" 163 android:layout_marginEnd="16dp" 164 android:layout_gravity="center_vertical" 165 style="@style/body" 166 android:textColor="@color/clock_white"/> 167 <LinearLayout 168 android:id="@+id/repeat_days" 169 android:layout_width="match_parent" 170 android:layout_height="48dp" 171 android:layout_marginLeft="10dp" 172 android:layout_marginStart="10dp" 173 android:layout_marginRight="10dp" 174 android:layout_marginEnd="10dp" 175 android:layout_gravity="top" 176 android:orientation="horizontal" 177 android:visibility="gone"> 178 <!-- Day buttons are put here programatically --> 179 </LinearLayout> 180 <LinearLayout 181 android:layout_width="match_parent" 182 android:layout_height="64dp" 183 android:layout_marginLeft="10dp" 184 android:layout_marginStart="10dp" 185 android:layout_marginRight="16dp" 186 android:layout_marginEnd="16dp" 187 android:gravity="center_vertical"> 188 189 <TextView 190 android:id="@+id/choose_ringtone" 191 android:layout_height="match_parent" 192 android:layout_width="0dp" 193 android:layout_weight="1" 194 android:layout_marginRight="16dp" 195 android:layout_marginEnd="16dp" 196 android:gravity="center_vertical" 197 style="@style/body" 198 android:background="@drawable/item_background" 199 android:clickable="true" 200 android:textColor="@color/clock_white" 201 android:ellipsize="marquee" 202 android:scrollHorizontally="true" 203 android:singleLine="true" 204 android:marqueeRepeatLimit="marquee_forever" 205 android:drawableLeft="@drawable/ic_ringtone" 206 android:drawableStart="@drawable/ic_ringtone" 207 android:drawablePadding="2dp" 208 /> 209 <CheckBox 210 android:id="@+id/vibrate_onoff" 211 android:text="@string/alarm_vibrate" 212 android:includeFontPadding="false" 213 android:textColor="@color/clock_gray" 214 android:layout_height="wrap_content" 215 android:layout_width="wrap_content" 216 android:layout_gravity="center_vertical|end" 217 style="@style/body"/> 218 </LinearLayout> 219 <View 220 android:id="@+id/hairline" 221 android:layout_height="1dp" 222 android:layout_marginLeft="8dp" 223 android:layout_marginStart="8dp" 224 android:layout_marginRight="8dp" 225 android:layout_marginEnd="8dp" 226 android:layout_width="match_parent" 227 android:background="#28ffffff"/> 228 <FrameLayout 229 android:id="@+id/collapse" 230 android:layout_width="match_parent" 231 android:layout_height="32dp" 232 android:background="@drawable/item_background" 233 android:clickable="true" 234 android:contentDescription="@string/collapse_alarm" 235 > 236 <ImageView 237 android:layout_width="48dp" 238 android:layout_height="32dp" 239 android:src="@drawable/ic_expand_up" 240 android:layout_gravity="end"/> 241 </FrameLayout> 242 </LinearLayout> 243 </com.android.deskclock.widget.swipeablelistview.SwipeLayout> 244