keyguard_password_view.xml revision bdffd5c3a18e67443ebbd16d4f0349d0728285b1
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3**
4** Copyright 2008, 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<com.android.internal.policy.impl.keyguard.KeyguardPasswordView
20    xmlns:android="http://schemas.android.com/apk/res/android"
21    android:id="@+id/keyguard_password_view"
22    android:orientation="vertical"
23    android:layout_width="match_parent"
24    android:layout_height="match_parent"
25    android:layout_gravity="center">
26
27    <FrameLayout
28        android:layout_width="match_parent"
29        android:layout_height="0dp"
30        android:layout_weight="1">
31
32        <LinearLayout
33            android:layout_height="wrap_content"
34            android:layout_width="match_parent"
35            android:orientation="vertical"
36            android:layout_gravity="center">
37
38            <LinearLayout
39                android:layout_height="wrap_content"
40                android:layout_width="match_parent"
41                android:orientation="vertical"
42                android:gravity="center">
43                <include layout="@layout/keyguard_navigation"/>
44            </LinearLayout>
45
46            <LinearLayout
47                android:layout_width="match_parent"
48                android:layout_height="wrap_content"
49                android:orientation="vertical">
50
51                <!-- Password entry field -->
52                <!-- Note: the entire container is styled to look like the edit field,
53                     since the backspace/IME switcher looks better inside -->
54                <LinearLayout
55                    android:layout_gravity="center_vertical|fill_horizontal"
56                    android:layout_height="wrap_content"
57                    android:layout_width="match_parent"
58                    android:orientation="horizontal"
59                    android:background="#70000000"
60                    android:layout_marginStart="4dip"
61                    android:layout_marginEnd="4dip">
62
63                    <EditText android:id="@+id/passwordEntry"
64                        android:layout_width="0dip"
65                        android:layout_height="wrap_content"
66                        android:layout_weight="1"
67                        android:gravity="center_horizontal"
68                        android:layout_gravity="center_vertical"
69                        android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
70                        android:singleLine="true"
71                        android:textStyle="normal"
72                        android:inputType="textPassword"
73                        android:textSize="36sp"
74                        android:background="@null"
75                        android:textAppearance="?android:attr/textAppearanceMedium"
76                        android:textColor="#ffffffff"
77                        android:imeOptions="flagForceAscii|actionDone"
78                        />
79
80                    <!-- This delete button is only visible for numeric PIN entry -->
81                    <ImageButton android:id="@+id/delete_button"
82                        android:layout_width="wrap_content"
83                        android:layout_height="wrap_content"
84                        android:layout_gravity="center_vertical"
85                        android:src="@*android:drawable/ic_input_delete"
86                        android:clickable="true"
87                        android:padding="8dip"
88                        android:background="?android:attr/selectableItemBackground"
89                        android:visibility="gone"
90                        />
91
92                    <ImageView android:id="@+id/switch_ime_button"
93                        android:layout_width="wrap_content"
94                        android:layout_height="wrap_content"
95                        android:src="@*android:drawable/ic_lockscreen_ime"
96                        android:clickable="true"
97                        android:padding="8dip"
98                        android:layout_gravity="center"
99                        android:background="?android:attr/selectableItemBackground"
100                        android:visibility="gone"
101                        />
102
103                </LinearLayout>
104
105                <!-- Numeric keyboard -->
106                <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
107                    android:layout_width="match_parent"
108                    android:layout_height="wrap_content"
109                    android:layout_marginStart="4dip"
110                    android:layout_marginEnd="4dip"
111                    android:paddingTop="4dip"
112                    android:paddingBottom="4dip"
113                    android:background="#40000000"
114                    android:keyBackground="@*android:drawable/btn_keyboard_key_ics"
115                    android:visibility="gone"
116                    android:clickable="true"
117                />
118            </LinearLayout>
119        </LinearLayout>
120    </FrameLayout>
121    <include layout="@layout/keyguard_emergency_carrier_area"
122             android:id="@+id/keyguard_selector_fade_container"
123             android:layout_width="match_parent"
124             android:layout_height="wrap_content"
125             android:orientation="vertical"
126             android:layout_gravity="bottom|center_horizontal"
127             android:gravity="center_horizontal" />
128
129</com.android.internal.policy.impl.keyguard.KeyguardPasswordView>
130