• 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     - Hid the emergency call at the bottom
22-->
23
24<com.android.keyguard.KeyguardPINView
25        xmlns:android="http://schemas.android.com/apk/res/android"
26        xmlns:app="http://schemas.android.com/apk/res-auto"
27        android:id="@+id/keyguard_pin_view"
28        android:layout_width="match_parent"
29        android:layout_height="match_parent">
30
31    <LinearLayout
32        android:layout_width="match_parent"
33        android:layout_height="match_parent"
34        android:layout_marginLeft="@dimen/num_pad_margin_left"
35        android:layout_marginRight="@dimen/num_pad_margin_right"
36        android:orientation="vertical"
37        android:gravity="center">
38
39        <LinearLayout
40            android:layout_width="wrap_content"
41            android:layout_height="wrap_content"
42            android:gravity="center"
43            android:orientation="vertical">
44
45            <com.android.keyguard.PasswordTextView
46                android:id="@+id/pinEntry"
47                android:layout_width="@dimen/keyguard_security_width"
48                android:layout_height="@dimen/pin_entry_height"
49                android:gravity="center"
50                android:focusedByDefault="true"
51                app:scaledTextSize="@integer/password_text_view_scale"
52                android:contentDescription="@string/keyguard_accessibility_pin_area" />
53
54            <View
55                android:id="@+id/divider"
56                android:layout_width="@dimen/keyguard_security_width"
57                android:layout_height="@dimen/divider_height"
58                android:background="@android:color/white" />
59
60            <TextView
61                android:layout_width="wrap_content"
62                android:layout_height="wrap_content"
63                android:layout_margin="@*android:dimen/car_padding_2"
64                android:gravity="center"
65                android:textColor="@android:color/white"
66                android:textSize="@*android:dimen/car_body1_size"
67                android:text="@string/keyguard_enter_your_pin" />
68
69            <include layout="@layout/keyguard_message_area" />
70
71        </LinearLayout>
72
73        <GridLayout
74            android:id="@+id/pin_container"
75            android:layout_width="wrap_content"
76            android:layout_height="wrap_content"
77            android:layout_marginVertical="@dimen/pin_pattern_pad_margin_vertical"
78            android:columnCount="3">
79
80            <include layout="@layout/num_pad_keys"/>
81        </GridLayout>
82
83        <Button
84            android:id="@+id/cancel_button"
85            android:layout_width="wrap_content"
86            android:layout_height="wrap_content"
87            android:layout_gravity="center"
88            style="@style/KeyguardButton"
89            android:text="@string/cancel"/>
90
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
123        layout="@layout/keyguard_eca"
124        android:id="@+id/keyguard_selector_fade_container"
125        android:layout_width="0dp"
126        android:layout_height="0dp"
127        android:visibility="gone" />
128</com.android.keyguard.KeyguardPINView>
129