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 <LinearLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:dc="http://schemas.android.com/apk/res-auto" 20 21 android:id="@+id/alarm_item" 22 android:layout_width="match_parent" 23 android:layout_height="wrap_content" 24 android:orientation="vertical" 25 android:gravity="center_horizontal|top" 26 android:background="@drawable/item_background" 27 android:clickable="true" > 28 29 <LinearLayout 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content" 32 android:layout_marginLeft="12dp" 33 android:layout_marginStart="12dp" 34 android:layout_marginRight="12dp" 35 android:layout_marginEnd="12dp" 36 android:layout_marginTop="12dp" 37 android:orientation="horizontal"> 38 <com.android.deskclock.widget.TextTime 39 android:id="@+id/digital_clock" 40 android:layout_width="wrap_content" 41 android:layout_height="wrap_content" 42 style="@style/medium_light" 43 android:textSize="@dimen/alarm_time_font_size" 44 android:textColor="@color/clock_white" 45 android:baselineAligned="true" 46 android:layout_gravity="center" 47 android:gravity="center" 48 dc:format12Hour="@string/alarm_time_12_hours_format" 49 dc:format24Hour="@string/clock_24_hours_format"/> 50 <Space 51 android:layout_height="match_parent" 52 android:layout_width="0dip" 53 android:layout_weight="1"/> 54 <Switch 55 android:layout_width="wrap_content" 56 android:layout_height="match_parent" 57 android:id="@+id/onoff" 58 android:thumbTextPadding="10dp" 59 android:layout_gravity="center_vertical|end"/> 60 </LinearLayout> 61 <FrameLayout 62 android:layout_width="match_parent" 63 android:layout_height="wrap_content" > 64 <ImageView 65 android:id="@+id/delete" 66 android:layout_width="wrap_content" 67 android:layout_height="wrap_content" 68 android:paddingTop="8dp" 69 android:paddingBottom="8dp" 70 android:paddingRight="8dp" 71 android:paddingEnd="8dp" 72 android:paddingLeft="8dp" 73 android:paddingStart="8dp" 74 android:contentDescription="@string/delete_alarm" 75 android:src="@drawable/ic_delete" 76 android:layout_gravity="top|end" /> 77 <LinearLayout 78 android:id="@+id/expand_area" 79 android:orientation="vertical" 80 android:layout_width="match_parent" 81 android:layout_height="wrap_content" 82 android:visibility="gone" 83 android:layout_marginBottom="@dimen/collapse_expand_height" 84 android:layout_gravity="bottom" > 85 <TextView 86 android:id="@+id/edit_label" 87 style="@style/body_not_caps" 88 android:textColor="@color/clock_gray" 89 android:hint="@string/label" 90 android:layout_width="wrap_content" 91 android:layout_height="wrap_content" 92 android:layout_marginRight="16dp" 93 android:layout_marginEnd="16dp" 94 android:paddingRight="12dp" 95 android:paddingEnd="12dp" 96 android:paddingLeft="18dp" 97 android:paddingStart="18dp" 98 android:paddingTop="12dp" 99 android:paddingBottom="12dp" 100 android:ellipsize="end" 101 android:singleLine="true" 102 android:background="@drawable/item_background" /> 103 <CheckBox 104 android:id="@+id/repeat_onoff" 105 android:text="@string/alarm_repeat" 106 android:layout_height="48dp" 107 android:layout_width="wrap_content" 108 android:layout_marginLeft="10dp" 109 android:layout_marginStart="10dp" 110 android:layout_marginRight="16dp" 111 android:layout_marginEnd="16dp" 112 android:layout_gravity="center_vertical|start" 113 style="@style/body" 114 android:textColor="@color/clock_white"/> 115 <LinearLayout 116 android:id="@+id/repeat_days" 117 android:layout_width="match_parent" 118 android:layout_height="48dp" 119 android:layout_marginLeft="10dp" 120 android:layout_marginStart="10dp" 121 android:layout_marginRight="10dp" 122 android:layout_marginEnd="10dp" 123 android:layout_gravity="top" 124 android:orientation="horizontal" 125 android:visibility="gone"> 126 <!-- Day buttons are put here programatically --> 127 </LinearLayout> 128 <RelativeLayout 129 android:layout_width="match_parent" 130 android:layout_height="64dp" 131 android:layout_marginLeft="10dp" 132 android:layout_marginStart="10dp" 133 android:layout_marginRight="16dp" 134 android:layout_marginEnd="16dp" 135 android:gravity="center_vertical"> 136 <TextView 137 android:id="@+id/choose_ringtone" 138 android:layout_height="match_parent" 139 android:layout_width="wrap_content" 140 android:layout_marginRight="16dp" 141 android:layout_marginEnd="16dp" 142 android:gravity="center_vertical" 143 android:textAlignment="viewStart" 144 style="@style/body" 145 android:background="@drawable/item_background" 146 android:clickable="true" 147 android:textColor="@color/clock_white" 148 android:ellipsize="marquee" 149 android:scrollHorizontally="true" 150 android:singleLine="true" 151 android:marqueeRepeatLimit="marquee_forever" 152 android:drawableLeft="@drawable/ic_ringtone" 153 android:drawableStart="@drawable/ic_ringtone" 154 android:drawablePadding="2dp" 155 android:layout_alignParentLeft="true" 156 android:layout_alignParentStart="true" 157 android:layout_toLeftOf="@+id/vibrate_onoff" 158 android:layout_toStartOf="@+id/vibrate_onoff" 159 /> 160 <CheckBox 161 android:id="@+id/vibrate_onoff" 162 android:text="@string/alarm_vibrate" 163 android:includeFontPadding="false" 164 android:textColor="@color/clock_gray" 165 android:layout_height="wrap_content" 166 android:layout_width="wrap_content" 167 android:layout_alignParentRight="true" 168 android:layout_alignParentEnd="true" 169 android:layout_centerVertical="true" 170 style="@style/body"/> 171 </RelativeLayout> 172 </LinearLayout> 173 <FrameLayout 174 android:id="@+id/collapse_expand" 175 android:layout_width="match_parent" 176 android:layout_height="@dimen/collapse_expand_height" 177 android:contentDescription="@string/collapse_alarm" 178 android:layout_gravity="bottom" > 179 <ImageView 180 android:id="@+id/arrow" 181 android:layout_width="48dp" 182 android:layout_height="32dp" 183 android:src="@drawable/ic_expand_down" 184 android:layout_gravity="start|center_vertical" 185 android:contentDescription="@string/expand_alarm" /> 186 <View 187 android:id="@+id/hairline" 188 android:layout_height="1dp" 189 android:layout_marginLeft="8dp" 190 android:layout_marginStart="8dp" 191 android:layout_marginRight="8dp" 192 android:layout_marginEnd="8dp" 193 android:layout_width="match_parent" 194 android:background="#28ffffff" 195 android:layout_gravity="bottom" /> 196 <com.android.deskclock.widget.EllipsizeLayout 197 android:id="@+id/summary" 198 android:layout_width="match_parent" 199 android:layout_height="match_parent" 200 android:layout_marginLeft="48dp" 201 android:layout_marginStart="48dp" 202 android:layout_marginRight="104dp" 203 android:layout_marginEnd="104dp" 204 android:gravity="center_vertical" > 205 <TextView android:id="@+id/label" 206 android:layout_width="wrap_content" 207 android:layout_height="wrap_content" 208 style="@style/alarm_label_not_caps" 209 android:textColor="@color/clock_gray" 210 android:ellipsize="end" 211 android:singleLine="true" /> 212 <TextView android:id="@+id/daysOfWeek" 213 android:layout_height="wrap_content" 214 android:layout_width="wrap_content" 215 style="@style/alarm_label_bold" 216 android:textColor="@color/clock_white" 217 android:ellipsize="none" 218 android:singleLine="true" /> 219 </com.android.deskclock.widget.EllipsizeLayout> 220 </FrameLayout> 221 </FrameLayout> 222 <View android:id="@+id/alarm_footer_filler" 223 android:visibility="gone" 224 android:layout_width="match_parent" 225 android:background="@color/blackish" 226 android:layout_height="@dimen/button_footer_height" /> 227 </LinearLayout> 228