blob: 788ecfc13f366250226f619fa5f529a001098c5f [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Car customizations
- Added title "Enter your PIN" under the entry field
- Put backspace and enter buttons in row 4
- PIN pad is on start side while entry field and title are on the end side
- Hid the emergency call at the bottom
-->
<com.android.keyguard.KeyguardPINView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/keyguard_pin_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingHorizontal="@dimen/car_margin">
<FrameLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent">
<GridLayout
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:columnCount="3">
<!-- Row 1 -->
<com.android.keyguard.NumPadKey
android:id="@+id/key1"
style="@style/NumPadKeyButton"
app:digit="@string/one" />
<com.android.keyguard.NumPadKey
android:id="@+id/key2"
style="@style/NumPadKeyButton"
app:digit="@string/two" />
<com.android.keyguard.NumPadKey
android:id="@+id/key3"
style="@style/NumPadKeyButton"
app:digit="@string/three" />
<!-- Row 2 -->
<com.android.keyguard.NumPadKey
android:id="@+id/key4"
style="@style/NumPadKeyButton"
app:digit="@string/four" />
<com.android.keyguard.NumPadKey
android:id="@+id/key5"
style="@style/NumPadKeyButton"
app:digit="@string/five" />
<com.android.keyguard.NumPadKey
android:id="@+id/key6"
style="@style/NumPadKeyButton"
app:digit="@string/six" />
<!-- Row 3 -->
<com.android.keyguard.NumPadKey
android:id="@+id/key7"
style="@style/NumPadKeyButton"
app:digit="@string/seven" />
<com.android.keyguard.NumPadKey
android:id="@+id/key8"
style="@style/NumPadKeyButton"
app:digit="@string/eight" />
<com.android.keyguard.NumPadKey
android:id="@+id/key9"
style="@style/NumPadKeyButton"
app:digit="@string/nine" />
<!-- Row 4 -->
<ImageButton
android:id="@+id/delete_button"
style="@style/NumPadKeyButton"
android:gravity="center_vertical"
android:src="@drawable/ic_backspace"
android:clickable="true"
android:tint="@android:color/white"
android:background="@drawable/ripple_drawable"
android:contentDescription="@string/keyboardview_keycode_delete" />
<com.android.keyguard.NumPadKey
android:id="@+id/key0"
style="@style/NumPadKeyButton"
app:digit="@string/zero" />
<ImageButton
android:id="@+id/key_enter"
style="@style/NumPadKeyButton"
android:src="@drawable/ic_done"
android:tint="@android:color/white"
android:background="@drawable/ripple_drawable"
android:contentDescription="@string/keyboardview_keycode_enter" />
</GridLayout>
</FrameLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<com.android.keyguard.PasswordTextView
android:id="@+id/pinEntry"
android:layout_width="@dimen/keyguard_security_width"
android:layout_height="@dimen/pin_entry_height"
android:gravity="center"
app:scaledTextSize="@integer/password_text_view_scale"
android:contentDescription="@string/keyguard_accessibility_pin_area" />
<View
android:id="@+id/divider"
android:layout_width="@dimen/keyguard_security_width"
android:layout_height="@dimen/divider_height"
android:background="@android:color/white" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/car_padding_2"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="@dimen/car_body1_size"
android:text="@string/keyguard_enter_your_pin" />
<include layout="@layout/keyguard_message_area"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/car_padding_4"/>
<Button
android:id="@+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="@style/KeyguardButton"
android:text="@string/cancel"/>
</LinearLayout>
<!-- KeyguardPinView references these resources ids in code so removing them will cause the
keyguard to crash. Instead put them down here where they are out of the way and set their
visibility to gone. -->
<com.android.keyguard.AlphaOptimizedRelativeLayout
android:id="@+id/row0"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row1"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row2"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row3"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row4"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<include layout="@layout/keyguard_eca"
android:id="@+id/keyguard_selector_fade_container"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
</com.android.keyguard.KeyguardPINView>