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:layout_marginStart="1dip"
57            android:layout_marginEnd="1dip"
58            android:focusable="true"
59            android:focusableInTouchMode="true"
60            />
61
62        <!-- Day -->
63        <NumberPicker
64            android:id="@+id/day"
65            android:layout_width="80dip"
66            android:layout_height="wrap_content"
67            android:layout_marginLeft="1dip"
68            android:layout_marginRight="1dip"
69            android:layout_marginStart="1dip"
70            android:layout_marginEnd="1dip"
71            android:focusable="true"
72            android:focusableInTouchMode="true"
73            />
74
75        <!-- Year -->
76        <NumberPicker
77            android:id="@+id/year"
78            android:layout_width="95dip"
79            android:layout_height="wrap_content"
80            android:layout_marginLeft="1dip"
81            android:layout_marginRight="1dip"
82            android:layout_marginStart="1dip"
83            android:layout_marginEnd="1dip"
84            android:focusable="true"
85            android:focusableInTouchMode="true"
86            />
87    </LinearLayout>
88</LinearLayout>
89