Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3 **
      4 ** Copyright 2007, 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 
     20 <!-- Layout of date picker-->
     21 
     22 <!-- The width of this container is manually set a little bigger than the one of the children
     23      contained in it. This helps to prevent rounding errors when toggling the "Show year" option -->
     24 
     25 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     26     android:orientation="vertical"
     27     android:layout_gravity="center_horizontal"
     28     android:layout_width="270dip"
     29     android:layout_height="wrap_content">
     30 
     31     <CheckBox
     32         android:id="@+id/yearToggle"
     33         android:text="@string/date_year_toggle"
     34         android:paddingTop="5dip"
     35         android:paddingBottom="5dip"
     36         android:textAppearance="?android:attr/textAppearanceLarge"
     37         android:layout_gravity="center_horizontal"
     38         android:layout_width="wrap_content"
     39         android:layout_height="wrap_content"/>
     40     <!-- Warning: everything within the parent is removed and re-ordered depending
     41          on the date format selected by the user. -->
     42     <LinearLayout
     43         android:id="@+id/parent"
     44         android:orientation="horizontal"
     45         android:layout_gravity="center_horizontal"
     46         android:layout_width="wrap_content"
     47         android:layout_height="wrap_content">
     48 
     49         <!-- Month -->
     50         <NumberPicker
     51             android:id="@+id/month"
     52             android:layout_width="80dip"
     53             android:layout_height="wrap_content"
     54             android:layout_marginLeft="1dip"
     55             android:layout_marginRight="1dip"
     56             android:focusable="true"
     57             android:focusableInTouchMode="true"
     58             />
     59 
     60         <!-- Day -->
     61         <NumberPicker
     62             android:id="@+id/day"
     63             android:layout_width="80dip"
     64             android:layout_height="wrap_content"
     65             android:layout_marginLeft="1dip"
     66             android:layout_marginRight="1dip"
     67             android:focusable="true"
     68             android:focusableInTouchMode="true"
     69             />
     70 
     71         <!-- Year -->
     72         <NumberPicker
     73             android:id="@+id/year"
     74             android:layout_width="95dip"
     75             android:layout_height="wrap_content"
     76             android:layout_marginLeft="1dip"
     77             android:layout_marginRight="1dip"
     78             android:focusable="true"
     79             android:focusableInTouchMode="true"
     80             />
     81     </LinearLayout>
     82 </LinearLayout>
     83