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