Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3 **
      4 ** Copyright 2018, The Android Open Source Project
      5 **
      6 ** Licensed under the Apache License, Version 2.0 (the "License")
      7 ** you may not use this file except in compliance with the License.
      8 ** You may obtain a copy of the License at
      9 **
     10 **     http://www.apache.org/licenses/LICENSE-2.0
     11 **
     12 ** Unless required by applicable law or agreed to in writing, software
     13 ** distributed under the License is distributed on an "AS IS" BASIS,
     14 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15 ** See the License for the specific language governing permissions and
     16 ** limitations under the License.
     17 */
     18 -->
     19 
     20 <!-- Car customizations
     21      - Added title "Enter your Password" below the password field
     22      - Hid the emergency call at the bottom
     23 -->
     24 
     25 <com.android.keyguard.KeyguardPasswordView
     26     xmlns:android="http://schemas.android.com/apk/res/android"
     27     xmlns:androidprv="http://schemas.android.com/apk/res-auto"
     28     android:id="@+id/keyguard_password_view"
     29     android:orientation="vertical"
     30     android:layout_width="match_parent"
     31     android:layout_height="match_parent"
     32     androidprv:layout_maxWidth="@dimen/keyguard_security_width"
     33     androidprv:layout_maxHeight="@dimen/keyguard_security_height"
     34     android:gravity="center">
     35 
     36     <include layout="@layout/keyguard_message_area" />
     37 
     38     <!-- Password entry field -->
     39     <LinearLayout
     40          android:layout_height="wrap_content"
     41          android:layout_width="wrap_content"
     42          android:layout_gravity="center_horizontal"
     43          android:orientation="vertical"
     44          android:theme="?attr/passwordStyle">
     45 
     46         <EditText
     47             android:id="@+id/passwordEntry"
     48             android:layout_width="@dimen/password_field_width"
     49             android:layout_height="wrap_content"
     50             android:gravity="center_horizontal"
     51             android:singleLine="true"
     52             android:textStyle="normal"
     53             android:inputType="textPassword"
     54             android:textSize="@*android:dimen/car_body1_size"
     55             android:textColor="?attr/wallpaperTextColor"
     56             android:textAppearance="?android:attr/textAppearanceMedium"
     57             android:imeOptions="flagForceAscii|actionDone"
     58             android:maxLength="@integer/password_text_view_scale"
     59          />
     60 
     61         <TextView
     62             android:layout_width="match_parent"
     63             android:layout_height="wrap_content"
     64             android:layout_margin="@*android:dimen/car_padding_2"
     65             android:gravity="center"
     66             android:textColor="@android:color/white"
     67             android:textSize="@*android:dimen/car_body1_size"
     68             android:text="@string/keyguard_enter_your_password" />
     69 
     70         <Button
     71             android:id="@+id/cancel_button"
     72             android:layout_width="wrap_content"
     73             android:layout_height="wrap_content"
     74             android:layout_gravity="center"
     75             style="@style/KeyguardButton"
     76             android:text="@string/cancel"/>
     77 
     78         <ImageView android:id="@+id/switch_ime_button"
     79             android:layout_width="wrap_content"
     80             android:layout_height="wrap_content"
     81             android:layout_marginBottom="12dp"
     82             android:src="@drawable/ic_lockscreen_ime"
     83             android:contentDescription="@string/accessibility_ime_switch_button"
     84             android:clickable="true"
     85             android:padding="8dp"
     86             android:tint="@color/background_protected"
     87             android:layout_gravity="end|center_vertical"
     88             android:background="?android:attr/selectableItemBackground"
     89             android:visibility="gone"
     90         />
     91     </LinearLayout>
     92 
     93     <include layout="@layout/keyguard_eca"
     94         android:id="@+id/keyguard_selector_fade_container"
     95         android:layout_width="match_parent"
     96         android:layout_height="wrap_content"
     97         android:layout_marginBottom="12dp"
     98         android:orientation="vertical"
     99         android:layout_gravity="bottom|center_horizontal"
    100         android:gravity="center_horizontal"
    101         android:visibility="gone"
    102     />
    103 
    104 </com.android.keyguard.KeyguardPasswordView>
    105