1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2016 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16 --> 17 18<androidx.gridlayout.widget.GridLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:app="http://schemas.android.com/apk/res-auto" 21 android:layout_width="match_parent" 22 android:layout_height="wrap_content" 23 android:paddingEnd="16dp" 24 android:paddingStart="16dp" 25 app:columnCount="8" 26 app:columnOrderPreserved="false" 27 app:rowCount="8"> 28 29 <include 30 layout="@layout/alarm_time_summary" 31 android:layout_width="wrap_content" 32 android:layout_height="wrap_content" 33 android:layout_marginTop="@dimen/alarm_clock_vertical_margin" 34 app:layout_column="0" 35 app:layout_columnSpan="4" 36 app:layout_gravity="center_vertical" 37 app:layout_row="0" /> 38 39 <androidx.appcompat.widget.SwitchCompat 40 android:id="@+id/onoff" 41 android:layout_width="wrap_content" 42 android:layout_height="wrap_content" 43 android:layout_marginTop="@dimen/alarm_clock_vertical_margin" 44 android:minHeight="@dimen/touch_target_min_size" 45 android:minWidth="@dimen/touch_target_min_size" 46 android:theme="@style/ThemeOverlay.Control.Accent" 47 app:layout_column="6" 48 app:layout_columnSpan="2" 49 app:layout_gravity="center_vertical" 50 app:layout_row="0" /> 51 52 <CheckBox 53 android:id="@+id/repeat_onoff" 54 style="@style/body" 55 android:layout_width="wrap_content" 56 android:layout_height="@dimen/touch_target_min_size" 57 android:paddingEnd="@dimen/checkbox_start_padding" 58 android:paddingStart="@dimen/checkbox_start_padding" 59 android:text="@string/alarm_repeat" 60 app:layout_column="0" 61 app:layout_columnSpan="2" 62 app:layout_row="1" /> 63 64 <!-- Day buttons are put here programmatically --> 65 <LinearLayout 66 android:id="@+id/repeat_days" 67 android:layout_width="0dp" 68 android:layout_height="@dimen/touch_target_min_size" 69 android:orientation="horizontal" 70 android:visibility="gone" 71 app:layout_column="0" 72 app:layout_columnSpan="8" 73 app:layout_gravity="fill_horizontal" 74 app:layout_row="2" /> 75 76 <TextView 77 android:id="@+id/choose_ringtone" 78 style="@style/body" 79 android:layout_width="0dp" 80 android:layout_height="@dimen/touch_target_min_size" 81 android:background="?attr/selectableItemBackground" 82 android:clickable="true" 83 android:drawablePadding="@dimen/alarm_horizontal_padding" 84 android:ellipsize="marquee" 85 android:gravity="start|center_vertical" 86 android:marqueeRepeatLimit="marquee_forever" 87 android:paddingEnd="@dimen/icon_margin" 88 android:paddingStart="@dimen/icon_margin" 89 android:scrollHorizontally="true" 90 android:singleLine="true" 91 android:textAlignment="viewStart" 92 app:layout_column="0" 93 app:layout_columnSpan="5" 94 app:layout_gravity="fill_horizontal" 95 app:layout_row="3" /> 96 97 <CheckBox 98 android:id="@+id/vibrate_onoff" 99 style="@style/body" 100 android:layout_width="wrap_content" 101 android:layout_height="@dimen/touch_target_min_size" 102 android:paddingEnd="@dimen/checkbox_start_padding" 103 android:paddingStart="@dimen/checkbox_start_padding" 104 android:text="@string/alarm_vibrate" 105 app:layout_column="5" 106 app:layout_columnSpan="3" 107 app:layout_gravity="center_vertical" 108 app:layout_row="3" /> 109 110 <TextView 111 android:id="@+id/edit_label" 112 style="@style/body" 113 android:layout_width="0dp" 114 android:layout_height="wrap_content" 115 android:background="?attr/selectableItemBackground" 116 android:drawablePadding="@dimen/alarm_horizontal_padding" 117 android:ellipsize="end" 118 android:gravity="start|center_vertical" 119 android:hint="@string/label" 120 android:paddingBottom="12dp" 121 android:paddingEnd="4dp" 122 android:paddingStart="4dp" 123 android:paddingTop="12dp" 124 android:singleLine="true" 125 android:textAlignment="viewStart" 126 app:layout_column="0" 127 app:layout_columnSpan="8" 128 app:layout_gravity="fill_horizontal" 129 app:layout_row="4" /> 130 131 <include 132 layout="@layout/preemptive_dismiss" 133 android:layout_width="wrap_content" 134 android:layout_height="wrap_content" 135 app:layout_column="0" 136 app:layout_columnSpan="3" 137 app:layout_row="5" /> 138 139 <View 140 android:id="@+id/hairline" 141 android:layout_width="0dp" 142 android:layout_height="@dimen/hairline_height" 143 android:layout_marginRight="@dimen/hairline_side_padding" 144 android:layout_marginLeft="@dimen/hairline_side_padding" 145 android:background="@color/hairline" 146 app:layout_column="0" 147 app:layout_columnSpan="8" 148 app:layout_gravity="fill_horizontal" 149 app:layout_row="6" /> 150 151 <Button 152 android:id="@+id/delete" 153 style="?attr/borderlessButtonStyle" 154 android:layout_width="wrap_content" 155 android:layout_height="wrap_content" 156 android:layout_marginBottom="@dimen/alarm_clock_vertical_margin" 157 android:layout_marginTop="@dimen/alarm_clock_vertical_margin" 158 android:drawablePadding="@dimen/alarm_horizontal_padding" 159 android:gravity="start|center_vertical" 160 android:paddingEnd="@dimen/checkbox_start_padding" 161 android:paddingStart="@dimen/icon_margin" 162 android:text="@string/delete" 163 android:textAllCaps="false" 164 android:textAppearance="@style/body" 165 app:layout_column="0" 166 app:layout_gravity="center_vertical" 167 app:layout_row="7" /> 168 169 <ImageButton 170 android:id="@+id/arrow" 171 android:layout_width="wrap_content" 172 android:layout_height="@dimen/touch_target_min_size" 173 android:layout_marginBottom="@dimen/alarm_clock_vertical_margin" 174 android:layout_marginTop="@dimen/alarm_clock_vertical_margin" 175 android:background="?attr/selectableItemBackgroundBorderless" 176 android:contentDescription="@string/collapse_alarm" 177 android:padding="@dimen/checkbox_start_padding" 178 android:scaleType="center" 179 app:layout_column="7" 180 app:layout_gravity="center_vertical" 181 app:layout_row="7" 182 app:srcCompat="@drawable/ic_caret_up" /> 183 184</androidx.gridlayout.widget.GridLayout> 185