Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3      Copyright (C) 2013 Google Inc.
      4      Licensed to The Android Open Source Project.
      5 
      6      Licensed under the Apache License, Version 2.0 (the "License");
      7      you may not use this file except in compliance with the License.
      8      You may obtain a copy of the License at
      9 
     10           http://www.apache.org/licenses/LICENSE-2.0
     11 
     12      Unless required by applicable law or agreed to in writing, software
     13      distributed under the License is distributed on an "AS IS" BASIS,
     14      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15      See the License for the specific language governing permissions and
     16      limitations under the License.
     17 -->
     18 
     19 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:layout_width="match_parent"
     21     android:layout_height="match_parent"
     22     android:layout_gravity="center_horizontal|top"
     23     android:fillViewport="true"
     24     android:paddingLeft="@dimen/compose_wrapper_side_padding"
     25     android:paddingRight="@dimen/compose_wrapper_side_padding">
     26 
     27     <!-- Horizontal layout to get side paddings for tablets -->
     28     <LinearLayout
     29         android:layout_width="match_parent"
     30         android:layout_height="match_parent"
     31         android:paddingTop="@dimen/compose_wrapper_top_padding">
     32 
     33         <!-- Start border -->
     34         <Space
     35             android:layout_width="0dp"
     36             android:layout_height="match_parent"
     37             android:layout_weight="@integer/compose_padding_weight" />
     38 
     39         <LinearLayout
     40             android:orientation="vertical"
     41             android:paddingLeft="@dimen/vacation_responder_padding_horizontal"
     42             android:paddingRight="@dimen/vacation_responder_padding_horizontal"
     43             style="@style/ComposeArea">
     44 
     45             <Switch
     46                 android:id="@+id/vacation_responder_switch"
     47                 android:layout_width="match_parent"
     48                 android:layout_height="wrap_content"
     49                 android:background="?android:attr/selectableItemBackground"
     50                 android:minHeight="56dp"
     51                 android:text="@string/preferences_vacation_responder_title"
     52                 android:textColor="@color/vacation_responder_main_text_color"
     53                 android:textSize="@dimen/vacation_responder_main_text_size" />
     54 
     55             <LinearLayout
     56                 android:layout_width="match_parent"
     57                 android:layout_height="wrap_content"
     58                 android:paddingTop="16dp">
     59 
     60                 <!-- Start date -->
     61                 <LinearLayout
     62                     android:layout_width="0dp"
     63                     android:layout_height="wrap_content"
     64                     android:layout_weight="1"
     65                     android:orientation="vertical"
     66                     style="@style/VacationResponderDatePadding">
     67 
     68                     <TextView
     69                         android:layout_width="match_parent"
     70                         android:layout_height="wrap_content"
     71                         android:text="@string/pick_start_date_title"
     72                         android:textColor="@color/vacation_responder_header_text_color"
     73                         android:textSize="@dimen/vacation_responder_header_text_size" />
     74 
     75                     <!-- date selector -->
     76                     <LinearLayout
     77                         android:id="@+id/start_date_selector"
     78                         android:layout_width="match_parent"
     79                         android:layout_height="wrap_content"
     80                         android:background="?android:attr/selectableItemBackground">
     81 
     82                         <TextView
     83                             android:id="@+id/start_date"
     84                             android:layout_width="0dp"
     85                             android:layout_height="wrap_content"
     86                             android:layout_weight="1"
     87                             android:paddingTop="8dp"
     88                             android:paddingBottom="8dp"
     89                             android:textColor="@color/vacation_responder_main_text_color"
     90                             android:textSize="@dimen/vacation_responder_main_text_size" />
     91 
     92                         <ImageView
     93                             android:layout_width="wrap_content"
     94                             android:layout_height="wrap_content"
     95                             android:layout_gravity="center_vertical"
     96                             android:src="@drawable/ic_drop_down_24dp" />
     97 
     98                     </LinearLayout>
     99 
    100                     <View
    101                         android:layout_marginTop="8dp"
    102                         style="@style/DefaultDividerStyle" />
    103 
    104                 </LinearLayout>
    105 
    106                 <!-- End date -->
    107                 <LinearLayout
    108                     android:layout_width="0dp"
    109                     android:layout_height="wrap_content"
    110                     android:layout_weight="1"
    111                     android:orientation="vertical">
    112 
    113                     <TextView
    114                         android:layout_width="match_parent"
    115                         android:layout_height="wrap_content"
    116                         android:text="@string/pick_end_date_title"
    117                         android:textColor="@color/vacation_responder_header_text_color"
    118                         android:textSize="@dimen/vacation_responder_header_text_size" />
    119 
    120                     <!-- date selector -->
    121                     <LinearLayout
    122                         android:id="@+id/end_date_selector"
    123                         android:layout_width="match_parent"
    124                         android:layout_height="wrap_content"
    125                         android:background="?android:attr/selectableItemBackground">
    126 
    127                         <TextView
    128                             android:id="@+id/end_date"
    129                             android:layout_width="0dp"
    130                             android:layout_height="wrap_content"
    131                             android:layout_weight="1"
    132                             android:paddingTop="8dp"
    133                             android:paddingBottom="8dp"
    134                             android:textColor="@color/vacation_responder_main_text_color"
    135                             android:textSize="@dimen/vacation_responder_main_text_size" />
    136 
    137                         <ImageView
    138                             android:layout_width="wrap_content"
    139                             android:layout_height="wrap_content"
    140                             android:layout_gravity="center_vertical"
    141                             android:src="@drawable/ic_drop_down_24dp" />
    142 
    143                     </LinearLayout>
    144 
    145                     <View
    146                         android:layout_marginTop="8dp"
    147                         style="@style/DefaultDividerStyle" />
    148 
    149                 </LinearLayout>
    150 
    151             </LinearLayout>
    152 
    153             <com.android.mail.compose.EnterSubject
    154                 android:id="@+id/subject"
    155                 android:layout_width="match_parent"
    156                 android:layout_height="wrap_content"
    157                 android:hint="@string/subject_hint"
    158                 android:imeOptions="actionDone|flagNoExtractUi|flagNoFullscreen"
    159                 android:inputType="textEmailSubject|textAutoCorrect|textCapSentences|textImeMultiLine|textMultiLine"
    160                 android:maxLength="@integer/vacation_responder_subject_length"
    161                 style="@style/VacationResponderInputField" />
    162 
    163             <View style="@style/DefaultDividerStyle" />
    164 
    165             <EditText
    166                 android:id="@+id/body"
    167                 android:layout_width="match_parent"
    168                 android:layout_height="wrap_content"
    169                 android:hint="@string/vacation_responder_body_hint_text"
    170                 android:imeOptions="flagNoFullscreen|actionDone|flagNoEnterAction"
    171                 android:inputType="textLongMessage|textMultiLine|textAutoCorrect|textCapSentences"
    172                 android:maxLength="@integer/vacation_responder_body_length"
    173                 style="@style/VacationResponderInputField" />
    174 
    175             <View style="@style/DefaultDividerStyle" />
    176 
    177             <CheckedTextView
    178                 android:id="@+id/checkbox_send_to_contacts"
    179                 android:text="@string/send_to_contacts_text"
    180                 style="@style/VacationResponderCheckBox" />
    181 
    182             <CheckedTextView
    183                 android:id="@+id/checkbox_send_to_domain"
    184                 style="@style/VacationResponderCheckBox" />
    185 
    186         </LinearLayout>
    187 
    188         <!-- End border -->
    189         <Space
    190             android:layout_width="0dp"
    191             android:layout_height="match_parent"
    192             android:layout_weight="@integer/compose_padding_weight" />
    193 
    194     </LinearLayout>
    195 
    196 </ScrollView>
    197