1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2013 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<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:tools="http://schemas.android.com/tools" 19 android:layout_width="wrap_content" 20 android:layout_height="wrap_content" > 21 22 <!-- This outer linear layout protects the fixed dimensions of the dialog. 23 The dimensions are not respected if this outer layout is not present. --> 24 <LinearLayout 25 android:layout_width="@dimen/recurrence_picker_width" 26 android:layout_height="@dimen/recurrence_picker_height" 27 android:background="@color/recurrence_picker_background" 28 android:orientation="vertical" 29 android:padding="0dp" > 30 31 <ScrollView 32 android:layout_width="match_parent" 33 android:layout_height="0dip" 34 android:layout_weight="1" > 35 36 <LinearLayout 37 android:layout_width="match_parent" 38 android:layout_height="wrap_content" 39 android:descendantFocusability="beforeDescendants" 40 android:focusable="true" 41 android:focusableInTouchMode="true" 42 android:orientation="vertical" > 43 44 <LinearLayout 45 android:layout_width="match_parent" 46 android:layout_height="wrap_content" 47 android:background="@android:color/white" 48 android:paddingLeft="12dip" 49 android:paddingTop="12dip" 50 android:paddingRight="12dip" 51 android:paddingBottom="4dip"> 52 53 <Spinner 54 android:id="@+id/freqSpinner" 55 style="@style/TextAppearance.RecurrencePickerStyle" 56 android:layout_width="0dp" 57 android:layout_weight="1" 58 android:layout_height="wrap_content" 59 android:layout_gravity="center_horizontal" 60 android:entries="@array/recurrence_freq" 61 android:gravity="left" 62 android:padding="0dp" /> 63 64 <Switch 65 android:id="@+id/repeat_switch" 66 android:layout_width="wrap_content" 67 android:layout_height="wrap_content" 68 android:layout_gravity="center_vertical" 69 android:thumb="@drawable/switch_thumb" 70 android:layout_marginLeft="4dp" /> 71 </LinearLayout> 72 73 <LinearLayout 74 android:id="@+id/options" 75 android:layout_width="match_parent" 76 android:layout_height="wrap_content" 77 android:measureAllChildren="true" 78 android:orientation="vertical" 79 android:paddingBottom="4dp" 80 android:paddingLeft="12dp" 81 android:paddingRight="12dp" 82 android:paddingTop="4dp" > 83 84 <LinearLayout 85 android:id="@+id/intervalGroup" 86 android:layout_width="match_parent" 87 android:layout_height="wrap_content" 88 android:gravity="start" 89 android:paddingLeft="4dp" > 90 91 <TextView 92 android:id="@+id/intervalPreText" 93 style="@style/TextAppearance.RecurrencePickerStyle" 94 android:layout_width="wrap_content" 95 android:layout_height="wrap_content" /> 96 97 <EditText 98 android:id="@+id/interval" 99 android:layout_width="wrap_content" 100 android:layout_height="wrap_content" 101 android:ems="2" 102 android:gravity="center_horizontal" 103 android:inputType="number" 104 android:maxLength="2" 105 android:paddingLeft="4dp" 106 android:paddingRight="4dp" 107 android:selectAllOnFocus="true" 108 android:textSize="15sp" 109 android:singleLine="true" > 110 </EditText> 111 112 <TextView 113 android:id="@+id/intervalPostText" 114 style="@style/TextAppearance.RecurrencePickerStyle" 115 android:layout_width="wrap_content" 116 android:layout_height="wrap_content" /> 117 </LinearLayout> 118 119 <RadioGroup 120 android:id="@+id/monthGroup" 121 android:layout_width="match_parent" 122 android:layout_height="wrap_content" 123 android:orientation="vertical" > 124 125 <RadioButton 126 android:id="@+id/repeatMonthlyByNthDayOfMonth" 127 style="@style/TextAppearance.RecurrencePickerStyle" 128 android:layout_width="wrap_content" 129 android:layout_height="wrap_content" 130 android:text="@string/recurrence_month_pattern_by_day" /> 131 132 <RadioButton 133 android:id="@+id/repeatMonthlyByNthDayOfTheWeek" 134 style="@style/TextAppearance.RecurrencePickerStyle" 135 android:layout_width="wrap_content" 136 android:layout_height="wrap_content" /> 137 </RadioGroup> 138 139 <LinearLayout 140 android:id="@+id/endGroup" 141 android:layout_width="match_parent" 142 android:layout_height="wrap_content" 143 android:gravity="start" 144 android:orientation="horizontal" 145 android:paddingLeft="0dp" > 146 147 <Spinner 148 android:id="@+id/endSpinner" 149 style="@style/TextAppearance.RecurrencePickerStyle" 150 android:layout_width="wrap_content" 151 android:layout_height="wrap_content" 152 android:layout_gravity="center_vertical" 153 android:layout_marginLeft="-4dp" 154 android:layout_marginRight="8dp" 155 android:entries="@array/recurrence_freq" 156 android:gravity="left|center_vertical" 157 android:padding="0dp" /> 158 159 <EditText 160 android:id="@+id/endCount" 161 android:layout_width="wrap_content" 162 android:layout_height="wrap_content" 163 android:layout_gravity="center_vertical" 164 android:layout_marginBottom="-3dp" 165 android:ems="3" 166 android:gravity="center_horizontal" 167 android:inputType="number" 168 android:maxLength="3" 169 android:selectAllOnFocus="true" 170 android:textSize="15sp" 171 android:singleLine="true" /> 172 173 <TextView 174 android:id="@+id/postEndCount" 175 style="@style/TextAppearance.RecurrencePickerStyle" 176 android:layout_width="wrap_content" 177 android:layout_height="wrap_content" 178 android:layout_gravity="center_vertical" 179 android:gravity="bottom" 180 android:singleLine="true" 181 android:layout_marginBottom="-3dp" 182 android:visibility="gone" /> 183 184 <TextView 185 android:id="@+id/endDate" 186 style="@style/TextAppearance.EditEvent_SpinnerButton" 187 android:textSize="15sp" 188 android:textColor="@color/recurrence_spinner_text_color" 189 android:layout_width="wrap_content" 190 android:layout_height="wrap_content" 191 android:layout_gravity="center" 192 android:singleLine="true" 193 android:minWidth="80dp" 194 android:contentDescription="@string/acessibility_recurrence_choose_end_date_description" 195 android:gravity="center_horizontal|bottom" 196 android:layout_marginTop="3dp" 197 android:layout_marginLeft="0dp" 198 android:layout_marginRight="0dp" 199 android:paddingLeft="12dp" 200 android:paddingRight="16dp" 201 android:paddingBottom="8dp" 202 android:visibility="gone" /> 203 </LinearLayout> 204 </LinearLayout> 205 </LinearLayout> 206 </ScrollView> 207 208 <View 209 android:layout_width="match_parent" 210 android:layout_height="1px" 211 android:layout_marginTop="8dp" 212 android:background="?android:attr/listDivider" 213 tools:ignore="PxUsage" /> 214 215 <LinearLayout 216 style="?android:attr/buttonBarStyle" 217 android:layout_width="match_parent" 218 android:layout_height="wrap_content" 219 android:orientation="horizontal" > 220 221 <Button 222 android:id="@+id/done" 223 style="?android:attr/buttonBarButtonStyle" 224 android:layout_width="match_parent" 225 android:layout_height="wrap_content" 226 android:text="@string/save_label" 227 android:textColor="@color/done_text_color" /> 228 </LinearLayout> 229 </LinearLayout> 230</LinearLayout> 231