1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2021 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 ~ distributed under the License is distributed on an "AS IS" BASIS, 12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 ~ See the License for the specific language governing permissions and 14 ~ limitations under the License. 15 --> 16 17<!-- Car customizations 18 - Added title "Enter your PIN" under the entry field 19 - Put backspace and enter buttons in row 4 20 - Hid the emergency call at the bottom 21--> 22 23<com.android.systemui.car.keyguard.CarKeyguardPINView 24 xmlns:android="http://schemas.android.com/apk/res/android" 25 xmlns:app="http://schemas.android.com/apk/res-auto" 26 android:id="@+id/keyguard_pin_view" 27 android:layout_width="match_parent" 28 android:layout_height="match_parent" 29 android:orientation="horizontal" 30 android:paddingHorizontal="@dimen/keyguard_pin_view_padding_horizontal"> 31 32 <FrameLayout 33 android:layout_width="0dp" 34 android:layout_weight="1" 35 android:layout_height="match_parent"> 36 37 <androidx.constraintlayout.widget.ConstraintLayout 38 android:id="@+id/pin_container" 39 android:layout_width="match_parent" 40 android:layout_height="match_parent" 41 android:layout_marginBottom="8dp" 42 android:layout_weight="1" 43 android:layoutDirection="ltr" 44 android:orientation="vertical"> 45 46 <androidx.constraintlayout.helper.widget.Flow 47 android:id="@+id/flow1" 48 android:layout_width="0dp" 49 android:layout_height="0dp" 50 android:orientation="horizontal" 51 app:constraint_referenced_ids="key1,key2,key3,key4,key5,key6,key7,key8,key9,delete_button,key0,key_enter" 52 app:flow_horizontalGap="@dimen/num_pad_key_margin_end" 53 app:flow_horizontalStyle="packed" 54 app:flow_maxElementsWrap="3" 55 app:flow_verticalStyle="packed" 56 app:flow_wrapMode="aligned" 57 app:layout_constraintEnd_toEndOf="parent" 58 app:layout_constraintStart_toStartOf="parent" 59 app:layout_constraintTop_toTopOf="parent" 60 app:layout_constraintBottom_toBottomOf="parent" /> 61 62 <include layout="@layout/num_pad_keys"/> 63 </androidx.constraintlayout.widget.ConstraintLayout> 64 </FrameLayout> 65 66 <LinearLayout 67 android:layout_width="0dp" 68 android:layout_height="match_parent" 69 android:layout_weight="1" 70 android:gravity="center" 71 android:orientation="vertical"> 72 73 <com.android.keyguard.PasswordTextView 74 android:id="@+id/pinEntry" 75 android:layout_width="@dimen/keyguard_security_width" 76 android:layout_height="@dimen/pin_entry_height" 77 android:gravity="center" 78 android:focusedByDefault="true" 79 app:scaledTextSize="@integer/password_text_view_scale" 80 android:contentDescription="@string/keyguard_accessibility_pin_area" /> 81 82 <View 83 android:id="@+id/divider" 84 android:layout_width="@dimen/keyguard_security_width" 85 android:layout_height="@dimen/divider_height" 86 android:background="@android:color/white" /> 87 88 <TextView 89 android:layout_width="wrap_content" 90 android:layout_height="wrap_content" 91 android:layout_margin="@*android:dimen/car_padding_2" 92 android:gravity="center" 93 android:textColor="@android:color/white" 94 android:textSize="@*android:dimen/car_body1_size" 95 android:text="@string/car_keyguard_enter_your_pin" /> 96 97 <include layout="@layout/keyguard_message_area" /> 98 99 <Button 100 android:id="@+id/cancel_button" 101 android:layout_width="wrap_content" 102 android:layout_height="wrap_content" 103 android:layout_gravity="center" 104 style="@style/KeyguardButton" 105 android:text="@string/cancel"/> 106 </LinearLayout> 107 108 <!-- CarKeyguardPinView references these resources ids in code so removing them will cause the 109 keyguard to crash. Instead put them down here where they are out of the way and set their 110 visibility to gone. --> 111 <com.android.keyguard.AlphaOptimizedRelativeLayout 112 android:id="@+id/row0" 113 android:layout_width="0dp" 114 android:layout_height="0dp" 115 android:visibility="gone" /> 116 117 <LinearLayout 118 android:id="@+id/row1" 119 android:layout_width="0dp" 120 android:layout_height="0dp" 121 android:visibility="gone" /> 122 123 <LinearLayout 124 android:id="@+id/row2" 125 android:layout_width="0dp" 126 android:layout_height="0dp" 127 android:visibility="gone" /> 128 129 <LinearLayout 130 android:id="@+id/row3" 131 android:layout_width="0dp" 132 android:layout_height="0dp" 133 android:visibility="gone" /> 134 135 <LinearLayout 136 android:id="@+id/row4" 137 android:layout_width="0dp" 138 android:layout_height="0dp" 139 android:visibility="gone" /> 140 141 <include layout="@layout/keyguard_eca" 142 android:id="@+id/keyguard_selector_fade_container" 143 android:layout_width="0dp" 144 android:layout_height="0dp" 145 android:visibility="gone"/> 146</com.android.systemui.car.keyguard.CarKeyguardPINView> 147