• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright 2018, 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-->
17
18<!-- Car customizations
19     - Added title "Enter your PIN" under the entry field
20     - Put backspace and enter buttons in row 4
21     - PIN pad is on start side while entry field and title are on the end side
22     -  Hid the emergency call at the bottom
23-->
24
25<com.android.keyguard.KeyguardPINView
26    xmlns:android="http://schemas.android.com/apk/res/android"
27    xmlns:app="http://schemas.android.com/apk/res-auto"
28    android:id="@+id/keyguard_pin_view"
29    android:layout_width="match_parent"
30    android:layout_height="match_parent"
31    android:orientation="horizontal"
32    android:paddingHorizontal="@*android:dimen/car_margin">
33
34    <FrameLayout
35        android:layout_width="0dp"
36        android:layout_weight="1"
37        android:layout_height="match_parent">
38
39        <GridLayout
40            android:id="@+id/pin_container"
41            android:layout_width="wrap_content"
42            android:layout_height="wrap_content"
43            android:layout_gravity="center"
44            android:gravity="center"
45            android:columnCount="3">
46
47            <include layout="@layout/num_pad_keys"/>
48        </GridLayout>
49    </FrameLayout>
50
51    <LinearLayout
52        android:layout_width="0dp"
53        android:layout_height="match_parent"
54        android:layout_weight="1"
55        android:gravity="center"
56        android:orientation="vertical">
57
58        <com.android.keyguard.PasswordTextView
59            android:id="@+id/pinEntry"
60            android:layout_width="@dimen/keyguard_security_width"
61            android:layout_height="@dimen/pin_entry_height"
62            android:gravity="center"
63            android:focusedByDefault="true"
64            app:scaledTextSize="@integer/password_text_view_scale"
65            android:contentDescription="@string/keyguard_accessibility_pin_area" />
66
67        <View
68            android:id="@+id/divider"
69            android:layout_width="@dimen/keyguard_security_width"
70            android:layout_height="@dimen/divider_height"
71            android:background="@android:color/white" />
72
73        <TextView
74            android:layout_width="wrap_content"
75            android:layout_height="wrap_content"
76            android:layout_margin="@*android:dimen/car_padding_2"
77            android:gravity="center"
78            android:textColor="@android:color/white"
79            android:textSize="@*android:dimen/car_body1_size"
80            android:text="@string/keyguard_enter_your_pin" />
81
82        <include layout="@layout/keyguard_message_area" />
83
84        <Button
85            android:id="@+id/cancel_button"
86            android:layout_width="wrap_content"
87            android:layout_height="wrap_content"
88            android:layout_gravity="center"
89            style="@style/KeyguardButton"
90            android:text="@string/cancel"/>
91    </LinearLayout>
92
93    <!-- KeyguardPinView references these resources ids in code so removing them will cause the
94         keyguard to crash. Instead put them down here where they are out of the way and set their
95         visibility to gone. -->
96    <com.android.keyguard.AlphaOptimizedRelativeLayout
97        android:id="@+id/row0"
98        android:layout_width="0dp"
99        android:layout_height="0dp"
100        android:visibility="gone" />
101    <LinearLayout
102        android:id="@+id/row1"
103        android:layout_width="0dp"
104        android:layout_height="0dp"
105        android:visibility="gone" />
106    <LinearLayout
107        android:id="@+id/row2"
108        android:layout_width="0dp"
109        android:layout_height="0dp"
110        android:visibility="gone" />
111    <LinearLayout
112        android:id="@+id/row3"
113        android:layout_width="0dp"
114        android:layout_height="0dp"
115        android:visibility="gone" />
116    <LinearLayout
117        android:id="@+id/row4"
118        android:layout_width="0dp"
119        android:layout_height="0dp"
120        android:visibility="gone" />
121
122    <include layout="@layout/keyguard_eca"
123         android:id="@+id/keyguard_selector_fade_container"
124         android:layout_width="0dp"
125         android:layout_height="0dp"
126         android:visibility="gone" />
127</com.android.keyguard.KeyguardPINView>
128