Android O SDK.
[android_tools.git] / sdk / platforms / android-26 / data / res / layout-land / time_picker_material.xml
blob863efef5c66197efc7ffa9c6b7e6144d7b566893
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3      Copyright (C) 2015 The Android Open Source Project
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
9           http://www.apache.org/licenses/LICENSE-2.0
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 -->
18 <LinearLayout
19     xmlns:android="http://schemas.android.com/apk/res/android"
20     android:layout_width="match_parent"
21     android:layout_height="wrap_content">
23     <RelativeLayout
24         android:id="@+id/time_header"
25         android:layout_width="wrap_content"
26         android:layout_height="match_parent"
27         android:gravity="center"
28         android:paddingStart="?attr/dialogPreferredPadding"
29         android:paddingEnd="?attr/dialogPreferredPadding">
31         <LinearLayout
32             android:id="@+id/time_layout"
33             android:layout_width="wrap_content"
34             android:layout_height="wrap_content"
35             android:paddingTop="@dimen/timepicker_radial_picker_top_margin"
36             android:orientation="horizontal">
38             <!-- The hour should always be to the left of the separator,
39                  regardless of the current locale's layout direction. -->
40             <com.android.internal.widget.NumericTextView
41                 android:id="@+id/hours"
42                 android:layout_width="wrap_content"
43                 android:layout_height="wrap_content"
44                 android:textAppearance="@style/TextAppearance.Material.TimePicker.TimeLabel"
45                 android:background="@drawable/time_picker_editable_background"
46                 android:singleLine="true"
47                 android:ellipsize="none"
48                 android:gravity="right"
49                 android:focusable="true"
50                 android:pointerIcon="hand"
51                 android:nextFocusForward="@+id/minutes" />
53             <TextView
54                 android:id="@+id/separator"
55                 android:layout_width="wrap_content"
56                 android:layout_height="wrap_content"
57                 android:textAppearance="@style/TextAppearance.Material.TimePicker.TimeLabel"
58                 android:importantForAccessibility="no"
59                 android:includeFontPadding="false" />
61             <!-- The minutes should always be to the right of the separator,
62                  regardless of the current locale's layout direction. -->
63             <com.android.internal.widget.NumericTextView
64                 android:id="@+id/minutes"
65                 android:layout_width="wrap_content"
66                 android:layout_height="wrap_content"
67                 android:textAppearance="@style/TextAppearance.Material.TimePicker.TimeLabel"
68                 android:background="@drawable/time_picker_editable_background"
69                 android:singleLine="true"
70                 android:ellipsize="none"
71                 android:gravity="left"
72                 android:focusable="true"
73                 android:pointerIcon="hand"
74                 android:nextFocusForward="@+id/am_label" />
75         </LinearLayout>
77         <RadioGroup
78             android:id="@+id/ampm_layout"
79             android:layout_width="wrap_content"
80             android:layout_height="wrap_content"
81             android:layout_below="@+id/time_layout"
82             android:layout_centerHorizontal="true"
83             android:paddingTop="4dp"
84             android:paddingBottom="4dp"
85             android:orientation="vertical"
86             android:layoutDirection="locale">
87             <RadioButton
88                 android:id="@+id/am_label"
89                 android:layout_width="wrap_content"
90                 android:layout_height="wrap_content"
91                 android:padding="8dp"
92                 android:layout_marginBottom="-8dp"
93                 android:textAppearance="@style/TextAppearance.Material.TimePicker.AmPmLabel"
94                 android:lines="1"
95                 android:ellipsize="none"
96                 android:focusable="true"
97                 android:background="?android:attr/selectableItemBackground"
98                 android:includeFontPadding="false"
99                 android:nextFocusForward="@+id/pm_label"
100                 android:button="@null" />
101             <RadioButton
102                 android:id="@+id/pm_label"
103                 android:layout_width="wrap_content"
104                 android:layout_height="wrap_content"
105                 android:padding="8dp"
106                 android:textAppearance="@style/TextAppearance.Material.TimePicker.AmPmLabel"
107                 android:lines="1"
108                 android:ellipsize="none"
109                 android:focusable="true"
110                 android:background="?android:attr/selectableItemBackground"
111                 android:includeFontPadding="false"
112                 android:button="@null" />
113         </RadioGroup>
114     </RelativeLayout>
116     <TextView
117         android:visibility="gone"
118         android:id="@+id/input_header"
119         android:layout_width="wrap_content"
120         android:layout_height="match_parent"
121         android:gravity="center"
122         android:paddingStart="@dimen/dialog_padding_material"
123         android:paddingEnd="@dimen/dialog_padding_material"
124         android:paddingTop="20dp"
125         android:paddingBottom="20dp"
126         android:includeFontPadding="false"
127         android:textAppearance="@style/TextAppearance.Material.TimePicker.InputHeader"
128         android:text="@string/time_picker_header_text"/>
130     <LinearLayout
131         android:layout_width="wrap_content"
132         android:layout_height="wrap_content"
133         android:orientation="vertical">
135         <android.widget.RadialTimePickerView
136             android:id="@+id/radial_picker"
137             android:layout_width="@dimen/timepicker_radial_picker_dimen"
138             android:layout_height="@dimen/timepicker_radial_picker_dimen"
139             android:layout_gravity="center|fill"
140             android:layout_marginTop="@dimen/timepicker_radial_picker_top_margin"
141             android:layout_marginStart="@dimen/timepicker_radial_picker_horizontal_margin"
142             android:layout_marginEnd="@dimen/timepicker_radial_picker_horizontal_margin"
143             android:layoutDirection="locale" />
145         <android.widget.TextInputTimePickerView
146             android:id="@+id/input_mode"
147             android:layout_width="match_parent"
148             android:layout_height="wrap_content"
149             android:paddingStart="?attr/dialogPreferredPadding"
150             android:paddingEnd="?attr/dialogPreferredPadding"
151             android:visibility="gone" />
153         <LinearLayout
154             android:layout_width="match_parent"
155             android:layout_height="wrap_content">
156             <ImageButton
157                 android:id="@+id/toggle_mode"
158                 android:layout_width="wrap_content"
159                 android:layout_height="wrap_content"
160                 android:layout_gravity="center_vertical"
161                 android:layout_marginStart="12dp"
162                 android:layout_marginEnd="12dp"
163                 android:padding="12dp"
164                 android:background="?attr/selectableItemBackgroundBorderless"
165                 android:tint="?attr/colorControlNormal"
166                 android:src="@drawable/btn_keyboard_key_material"
167                 android:contentDescription="@string/time_picker_text_input_mode_description" />
168             <Space
169                 android:layout_width="wrap_content"
170                 android:layout_height="wrap_content"
171                 android:layout_weight="1" />
172             <ViewStub
173                 android:id="@id/buttonPanel"
174                 android:layout="@layout/alert_dialog_button_bar_material"
175                 android:layout_width="wrap_content"
176                 android:layout_height="wrap_content"
177                 android:layoutDirection="locale" />
178         </LinearLayout>
179     </LinearLayout>
181 </LinearLayout>