Android O SDK.
[android_tools.git] / sdk / platforms / android-26 / data / res / layout / time_picker_header_material.xml
blobced17227aa2d76fc39d1295ac17051dbaf58965f
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   -->
18 <!-- This layout is duplicated in land/time_picker_material.xml, so any
19      changes made here need to be manually copied over. -->
20 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
21                 android:id="@+id/time_header"
22                 android:layout_width="match_parent"
23                 android:layout_height="match_parent"
24                 android:paddingStart="16dp"
25                 android:paddingEnd="16dp">
27     <!-- The hour should always be to the left of the separator,
28          regardless of the current locale's layout direction. -->
29     <com.android.internal.widget.NumericTextView
30         android:id="@+id/hours"
31         android:layout_width="wrap_content"
32         android:layout_height="wrap_content"
33         android:layout_toLeftOf="@+id/separator"
34         android:layout_alignBaseline="@+id/separator"
35         android:textAppearance="@style/TextAppearance.Material.TimePicker.TimeLabel"
36         android:background="@drawable/time_picker_editable_background"
37         android:singleLine="true"
38         android:ellipsize="none"
39         android:gravity="right"
40         android:focusable="true"
41         android:pointerIcon="hand"
42         android:nextFocusForward="@+id/minutes" />
44     <TextView
45         android:id="@+id/separator"
46         android:layout_width="wrap_content"
47         android:layout_height="wrap_content"
48         android:layout_marginLeft="@dimen/timepicker_separator_padding"
49         android:layout_marginRight="@dimen/timepicker_separator_padding"
50         android:layout_centerInParent="true"
51         android:textAppearance="@style/TextAppearance.Material.TimePicker.TimeLabel"
52         android:importantForAccessibility="no" />
54     <!-- The minutes should always be to the left of the separator,
55          regardless of the current locale's layout direction. -->
56     <com.android.internal.widget.NumericTextView
57         android:id="@+id/minutes"
58         android:layout_width="wrap_content"
59         android:layout_height="wrap_content"
60         android:layout_toRightOf="@+id/separator"
61         android:layout_alignBaseline="@+id/separator"
62         android:textAppearance="@style/TextAppearance.Material.TimePicker.TimeLabel"
63         android:background="@drawable/time_picker_editable_background"
64         android:singleLine="true"
65         android:ellipsize="none"
66         android:gravity="left"
67         android:focusable="true"
68         android:pointerIcon="hand"
69         android:nextFocusForward="@+id/am_label" />
71     <!-- The layout alignment of this view will switch between toRightOf
72          @id/minutes and toLeftOf @id/hours depending on the locale. -->
73     <RadioGroup
74         android:id="@+id/ampm_layout"
75         android:layout_width="wrap_content"
76         android:layout_height="wrap_content"
77         android:layout_toRightOf="@+id/minutes"
78         android:layout_alignBaseline="@+id/minutes"
79         android:paddingStart="4dp"
80         android:paddingEnd="4dp"
81         android:orientation="vertical"
82         android:baselineAlignedChildIndex="1">
83         <RadioButton
84             android:id="@+id/am_label"
85             android:layout_width="wrap_content"
86             android:layout_height="wrap_content"
87             android:paddingLeft="4dp"
88             android:paddingRight="4dp"
89             android:paddingTop="8dp"
90             android:paddingBottom="8dp"
91             android:layout_marginBottom="-8dp"
92             android:textAppearance="@style/TextAppearance.Material.TimePicker.AmPmLabel"
93             android:lines="1"
94             android:ellipsize="none"
95             android:focusable="true"
96             android:background="?android:attr/selectableItemBackground"
97             android:includeFontPadding="false"
98             android:nextFocusForward="@+id/pm_label"
99             android:button="@null" />
100         <RadioButton
101             android:id="@+id/pm_label"
102             android:layout_width="wrap_content"
103             android:layout_height="wrap_content"
104             android:paddingLeft="4dp"
105             android:paddingRight="4dp"
106             android:paddingTop="8dp"
107             android:paddingBottom="8dp"
108             android:textAppearance="@style/TextAppearance.Material.TimePicker.AmPmLabel"
109             android:lines="1"
110             android:ellipsize="none"
111             android:focusable="true"
112             android:background="?android:attr/selectableItemBackground"
113             android:includeFontPadding="false"
114             android:button="@null" />
115     </RadioGroup>
116 </RelativeLayout>