Home | History | Annotate | Download | only in layout
      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="@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                     <com.android.calendar.recurrencepicker.LinearLayoutWithMaxWidth
    120                         android:id="@+id/weekGroup"
    121                         android:layout_width="match_parent"
    122                         android:layout_height="wrap_content"
    123                         android:layout_marginLeft="4dp"
    124                         android:layout_marginRight="4dp"
    125                         android:layout_marginTop="8dp"
    126                         android:gravity="center_horizontal"
    127                         android:orientation="horizontal" >
    128 
    129                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    130 
    131                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    132 
    133                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    134 
    135                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    136 
    137                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    138 
    139                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    140 
    141                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    142                     </com.android.calendar.recurrencepicker.LinearLayoutWithMaxWidth>
    143 
    144                     <com.android.calendar.recurrencepicker.LinearLayoutWithMaxWidth
    145                         android:id="@+id/weekGroup2"
    146                         android:layout_width="match_parent"
    147                         android:layout_height="wrap_content"
    148                         android:layout_marginLeft="4dp"
    149                         android:layout_marginRight="4dp"
    150                         android:gravity="center_horizontal"
    151                         android:orientation="horizontal"
    152                         android:visibility="gone" >
    153 
    154                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    155 
    156                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    157 
    158                         <com.android.calendar.recurrencepicker.WeekButton style="@style/RecurrenceDayOfWeekStyle" />
    159 
    160                         <com.android.calendar.recurrencepicker.WeekButton
    161                             style="@style/RecurrenceDayOfWeekStyle"
    162                             android:visibility="invisible" />
    163                     </com.android.calendar.recurrencepicker.LinearLayoutWithMaxWidth>
    164 
    165                     <RadioGroup
    166                         android:id="@+id/monthGroup"
    167                         android:layout_width="match_parent"
    168                         android:layout_height="wrap_content"
    169                         android:orientation="vertical" >
    170 
    171                         <RadioButton
    172                             android:id="@+id/repeatMonthlyByNthDayOfMonth"
    173                             style="@style/TextAppearance.RecurrencePickerStyle"
    174                             android:layout_width="wrap_content"
    175                             android:layout_height="wrap_content"
    176                             android:text="@string/recurrence_month_pattern_by_day" />
    177 
    178                         <RadioButton
    179                             android:id="@+id/repeatMonthlyByNthDayOfTheWeek"
    180                             style="@style/TextAppearance.RecurrencePickerStyle"
    181                             android:layout_width="wrap_content"
    182                             android:layout_height="wrap_content" />
    183                     </RadioGroup>
    184 
    185                     <LinearLayout
    186                         android:id="@+id/endGroup"
    187                         android:layout_width="match_parent"
    188                         android:layout_height="wrap_content"
    189                         android:gravity="start"
    190                         android:orientation="horizontal"
    191                         android:paddingLeft="0dp" >
    192 
    193                         <Spinner
    194                             android:id="@+id/endSpinner"
    195                             style="@style/TextAppearance.RecurrencePickerStyle"
    196                             android:layout_width="wrap_content"
    197                             android:layout_height="wrap_content"
    198                             android:layout_gravity="center_vertical"
    199                             android:layout_marginLeft="-4dp"
    200                             android:layout_marginRight="8dp"
    201                             android:entries="@array/recurrence_freq"
    202                             android:gravity="left|center_vertical"
    203                             android:padding="0dp" />
    204 
    205                         <EditText
    206                             android:id="@+id/endCount"
    207                             android:layout_width="wrap_content"
    208                             android:layout_height="wrap_content"
    209                             android:layout_gravity="center_vertical"
    210                             android:layout_marginBottom="-3dp"
    211                             android:ems="3"
    212                             android:gravity="center_horizontal"
    213                             android:inputType="number"
    214                             android:maxLength="3"
    215                             android:selectAllOnFocus="true"
    216                             android:textSize="15sp"
    217                             android:singleLine="true" />
    218 
    219                         <TextView
    220                             android:id="@+id/postEndCount"
    221                             style="@style/TextAppearance.RecurrencePickerStyle"
    222                             android:layout_width="wrap_content"
    223                             android:layout_height="wrap_content"
    224                             android:layout_gravity="center_vertical"
    225                             android:gravity="bottom"
    226                             android:singleLine="true"
    227                             android:layout_marginBottom="-3dp"
    228                             android:visibility="gone" />
    229 
    230                         <TextView
    231                             android:id="@+id/endDate"
    232                             style="@style/TextAppearance.EditEvent_SpinnerButton"
    233                             android:textSize="15sp"
    234                             android:textColor="@color/recurrence_spinner_text_color"
    235                             android:layout_width="wrap_content"
    236                             android:layout_height="wrap_content"
    237                             android:layout_gravity="center"
    238                             android:singleLine="true"
    239                             android:minWidth="80dp"
    240                             android:contentDescription="@string/acessibility_recurrence_choose_end_date_description"
    241                             android:gravity="center_horizontal|bottom"
    242                             android:layout_marginTop="3dp"
    243                             android:layout_marginLeft="0dp"
    244                             android:layout_marginRight="0dp"
    245                             android:paddingLeft="12dp"
    246                             android:paddingRight="16dp"
    247                             android:paddingBottom="8dp"
    248                             android:visibility="gone" />
    249                     </LinearLayout>
    250                 </LinearLayout>
    251             </LinearLayout>
    252         </ScrollView>
    253 
    254         <View
    255             android:layout_width="match_parent"
    256             android:layout_height="1px"
    257             android:layout_marginTop="8dp"
    258             android:background="?android:attr/listDivider"
    259             tools:ignore="PxUsage" />
    260 
    261         <LinearLayout
    262             style="?android:attr/buttonBarStyle"
    263             android:layout_width="match_parent"
    264             android:layout_height="wrap_content"
    265             android:orientation="horizontal" >
    266 
    267             <Button
    268                 android:id="@+id/done"
    269                 style="?android:attr/buttonBarButtonStyle"
    270                 android:layout_width="match_parent"
    271                 android:layout_height="wrap_content"
    272                 android:text="@string/save_label"
    273                 android:textColor="@color/done_text_color" />
    274         </LinearLayout>
    275     </LinearLayout>
    276 </LinearLayout>
    277