Home | History | Annotate | Download | only in layout
      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                 app:scaledTextSize="@integer/password_text_view_scale"
     51                 android:contentDescription="@string/keyguard_accessibility_pin_area" />
     52 
     53             <View
     54                 android:id="@+id/divider"
     55                 android:layout_width="@dimen/keyguard_security_width"
     56                 android:layout_height="@dimen/divider_height"
     57                 android:background="@android:color/white" />
     58 
     59             <TextView
     60                 android:layout_width="wrap_content"
     61                 android:layout_height="wrap_content"
     62                 android:layout_margin="@*android:dimen/car_padding_2"
     63                 android:gravity="center"
     64                 android:textColor="@android:color/white"
     65                 android:textSize="@*android:dimen/car_body1_size"
     66                 android:text="@string/keyguard_enter_your_pin" />
     67 
     68             <include layout="@layout/keyguard_message_area" />
     69 
     70         </LinearLayout>
     71 
     72         <GridLayout
     73             android:id="@+id/container"
     74             android:layout_width="wrap_content"
     75             android:layout_height="wrap_content"
     76             android:layout_marginVertical="@dimen/pin_pattern_pad_margin_vertical"
     77             android:columnCount="3">
     78 
     79             <include layout="@layout/num_pad_keys"/>
     80         </GridLayout>
     81 
     82         <Button
     83             android:id="@+id/cancel_button"
     84             android:layout_width="wrap_content"
     85             android:layout_height="wrap_content"
     86             android:layout_gravity="center"
     87             style="@style/KeyguardButton"
     88             android:text="@string/cancel"/>
     89 
     90     </LinearLayout>
     91 
     92     <!-- KeyguardPinView references these resources ids in code so removing them will cause the
     93          keyguard to crash. Instead put them down here where they are out of the way and set their
     94          visibility to gone. -->
     95     <com.android.keyguard.AlphaOptimizedRelativeLayout
     96         android:id="@+id/row0"
     97         android:layout_width="0dp"
     98         android:layout_height="0dp"
     99         android:visibility="gone" />
    100     <LinearLayout
    101         android:id="@+id/row1"
    102         android:layout_width="0dp"
    103         android:layout_height="0dp"
    104         android:visibility="gone" />
    105     <LinearLayout
    106         android:id="@+id/row2"
    107         android:layout_width="0dp"
    108         android:layout_height="0dp"
    109         android:visibility="gone" />
    110     <LinearLayout
    111         android:id="@+id/row3"
    112         android:layout_width="0dp"
    113         android:layout_height="0dp"
    114         android:visibility="gone" />
    115     <LinearLayout
    116         android:id="@+id/row4"
    117         android:layout_width="0dp"
    118         android:layout_height="0dp"
    119         android:visibility="gone" />
    120 
    121     <include
    122         layout="@layout/keyguard_eca"
    123         android:id="@+id/keyguard_selector_fade_container"
    124         android:layout_width="0dp"
    125         android:layout_height="0dp"
    126         android:visibility="gone" />
    127 </com.android.keyguard.KeyguardPINView>
    128