• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4** Copyright 2014, 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<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
21  android:layout_width="match_parent"
22  android:layout_height="match_parent"
23  android:gravity="center_horizontal"
24  android:orientation="vertical">
25  <!-- header text ('Enter Pin') -->
26  <LinearLayout
27    android:layout_width="match_parent"
28    android:layout_height="0dp"
29    android:layout_weight="1"
30    android:orientation="vertical"
31    android:paddingTop="48dp"
32    android:paddingStart="48dp"
33    android:paddingEnd="48dp">
34    <TextView
35      android:id="@+id/headerText"
36      android:layout_width="match_parent"
37      android:layout_height="wrap_content"
38      android:gravity="center"
39      android:lines="2"
40      android:textAppearance="@android:style/TextAppearance.DeviceDefault.DialogWindowTitle"
41      android:accessibilityLiveRegion="polite"/>
42
43    <!-- hint text ('PIN too short') -->
44    <TextView
45      android:id="@+id/hintText"
46      android:layout_width="match_parent"
47      android:layout_height="wrap_content"
48      android:gravity="center"
49      android:lines="2" />
50
51    <!-- error text ('PIN too short') -->
52    <TextView
53      android:id="@+id/errorText"
54      android:layout_width="match_parent"
55      android:layout_height="wrap_content"
56      android:gravity="center"
57      android:lines="2"
58      android:textColor="@android:color/holo_red_dark"/>
59
60    <!-- Password entry field -->
61    <EditText
62      android:id="@+id/pin_entry"
63      android:layout_width="match_parent"
64      android:layout_height="wrap_content"
65      android:layout_gravity="center"
66      android:gravity="center"
67      android:imeOptions="actionNext|flagNoExtractUi"
68      android:inputType="numberPassword"
69      android:textSize="24sp"/>
70  </LinearLayout>
71
72  <LinearLayout
73    android:layout_width="match_parent"
74    android:layout_height="wrap_content"
75    android:clipChildren="false"
76    android:clipToPadding="false"
77    android:gravity="end"
78    android:orientation="horizontal">
79
80    <!-- left : cancel -->
81    <Button
82      android:id="@+id/cancel_button"
83      android:layout_width="0dp"
84      android:layout_weight="1"
85      android:layout_height="wrap_content"
86      android:text="@string/change_pin_cancel_label"/>
87
88    <!-- right : continue -->
89    <Button
90      android:id="@+id/next_button"
91      android:layout_width="0dp"
92      android:layout_weight="1"
93      android:layout_height="wrap_content"
94      android:text="@string/change_pin_continue_label"/>
95
96  </LinearLayout>
97</LinearLayout>
98