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.systemui.car.keyguard.CarKeyguardPINView 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 android:orientation="horizontal" 31 android:layout_gravity="center_vertical" 32 android:paddingHorizontal="@dimen/keyguard_pin_view_padding_horizontal" 33 app:layout_maxHeight="@dimen/pin_view_container_maxHeight"> 34 35 <FrameLayout 36 android:layout_width="0dp" 37 android:layout_weight="1" 38 android:layout_height="match_parent"> 39 40 <androidx.constraintlayout.widget.ConstraintLayout 41 android:id="@+id/pin_container" 42 android:layout_width="match_parent" 43 android:layout_height="match_parent" 44 android:layout_marginBottom="8dp" 45 android:layout_weight="1" 46 android:layoutDirection="ltr" 47 android:orientation="vertical"> 48 49 <androidx.constraintlayout.helper.widget.Flow 50 android:id="@+id/flow1" 51 android:layout_width="0dp" 52 android:layout_height="0dp" 53 android:orientation="horizontal" 54 app:constraint_referenced_ids="key1,key2,key3,key4,key5,key6,key7,key8,key9,delete_button,key0,key_enter" 55 app:flow_horizontalGap="@dimen/num_pad_key_margin_end" 56 app:flow_horizontalStyle="packed" 57 app:flow_maxElementsWrap="3" 58 app:flow_verticalStyle="packed" 59 app:flow_wrapMode="aligned" 60 app:layout_constraintEnd_toEndOf="parent" 61 app:layout_constraintStart_toStartOf="parent" 62 app:layout_constraintTop_toTopOf="parent" 63 app:layout_constraintBottom_toBottomOf="parent" /> 64 65 <include layout="@layout/num_pad_keys"/> 66 </androidx.constraintlayout.widget.ConstraintLayout> 67 </FrameLayout> 68 69 <LinearLayout 70 android:layout_width="0dp" 71 android:layout_height="match_parent" 72 android:layout_weight="1" 73 android:gravity="center" 74 android:orientation="vertical"> 75 76 <com.android.keyguard.PasswordTextView 77 android:id="@+id/pinEntry" 78 android:layout_width="@dimen/keyguard_security_width" 79 android:layout_height="@dimen/pin_entry_height" 80 android:gravity="center" 81 android:focusedByDefault="true" 82 app:scaledTextSize="@integer/password_text_view_scale" 83 android:contentDescription="@string/keyguard_accessibility_pin_area" /> 84 85 <View 86 android:id="@+id/divider" 87 android:layout_width="@dimen/keyguard_security_width" 88 android:layout_height="@dimen/divider_height" 89 android:background="@android:color/white" /> 90 91 <TextView 92 android:layout_width="wrap_content" 93 android:layout_height="wrap_content" 94 android:layout_margin="@*android:dimen/car_padding_2" 95 android:gravity="center" 96 android:textColor="@android:color/white" 97 android:textSize="@*android:dimen/car_body1_size" 98 android:text="@string/car_keyguard_enter_your_pin" /> 99 100 <include layout="@layout/keyguard_message_area" /> 101 102 <Button 103 android:id="@+id/cancel_button" 104 android:layout_width="wrap_content" 105 android:layout_height="wrap_content" 106 android:layout_gravity="center" 107 style="@style/KeyguardButton" 108 android:text="@string/cancel"/> 109 </LinearLayout> 110 111 <!-- CarKeyguardPinView references these resources ids in code so removing them will cause the 112 keyguard to crash. Instead put them down here where they are out of the way and set their 113 visibility to gone. --> 114 <com.android.keyguard.AlphaOptimizedRelativeLayout 115 android:id="@+id/row0" 116 android:layout_width="0dp" 117 android:layout_height="0dp" 118 android:visibility="gone" /> 119 120 <LinearLayout 121 android:id="@+id/row1" 122 android:layout_width="0dp" 123 android:layout_height="0dp" 124 android:visibility="gone" /> 125 126 <LinearLayout 127 android:id="@+id/row2" 128 android:layout_width="0dp" 129 android:layout_height="0dp" 130 android:visibility="gone" /> 131 132 <LinearLayout 133 android:id="@+id/row3" 134 android:layout_width="0dp" 135 android:layout_height="0dp" 136 android:visibility="gone" /> 137 138 <LinearLayout 139 android:id="@+id/row4" 140 android:layout_width="0dp" 141 android:layout_height="0dp" 142 android:visibility="gone" /> 143 144 <include layout="@layout/keyguard_eca" 145 android:id="@+id/keyguard_selector_fade_container" 146 android:layout_width="0dp" 147 android:layout_height="0dp" 148 android:visibility="gone"/> 149</com.android.systemui.car.keyguard.CarKeyguardPINView> 150