Skip to content

Commit b30ddd9

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "SIM PIN support." into jb-mr1-lockscreen-dev
2 parents 9de90c1 + 53149e6 commit b30ddd9

File tree

2 files changed

+242
-200
lines changed

2 files changed

+242
-200
lines changed

core/res/res/layout/keyguard_sim_pin_view.xml

Lines changed: 176 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -19,98 +19,198 @@
1919
<!-- This is the SIM PIN view that allows the user to enter a SIM PIN to unlock the device. -->
2020
<com.android.internal.policy.impl.keyguard.KeyguardSimPinView
2121
xmlns:android="http://schemas.android.com/apk/res/android"
22+
xmlns:androidprv="http://schemas.android.com/apk/res/android"
2223
android:id="@+id/keyguard_sim_pin_view"
2324
android:orientation="vertical"
2425
android:layout_width="match_parent"
2526
android:layout_height="match_parent"
2627
android:gravity="center_horizontal">
2728

29+
<ImageView
30+
android:layout_width="wrap_content"
31+
android:layout_height="wrap_content"
32+
android:src="@drawable/ic_lockscreen_sim"/>
33+
34+
<include layout="@layout/keyguard_message_area"
35+
android:layout_width="match_parent"
36+
android:layout_height="wrap_content"
37+
/>
2838
<LinearLayout
2939
android:layout_width="match_parent"
3040
android:layout_height="0dp"
41+
android:orientation="horizontal"
3142
android:layout_weight="1"
32-
android:orientation="vertical">
33-
34-
<LinearLayout
35-
android:layout_height="0dip"
36-
android:layout_width="match_parent"
43+
>
44+
<TextView android:id="@+id/pinEntry"
45+
android:editable="true"
46+
android:layout_width="0dip"
47+
android:layout_height="match_parent"
3748
android:layout_weight="1"
38-
android:orientation="vertical"
39-
android:gravity="center">
40-
41-
<ImageView
42-
android:layout_width="wrap_content"
43-
android:layout_height="wrap_content"
44-
android:src="@drawable/ic_lockscreen_sim"/>
45-
46-
<include layout="@layout/keyguard_message_area_large"
47-
android:layout_width="match_parent"
48-
android:layout_height="wrap_content" />
49-
50-
</LinearLayout>
51-
52-
<!-- Password entry field -->
53-
<!-- Note: the entire container is styled to look like the edit field,
54-
since the backspace/IME switcher looks better inside -->
55-
<LinearLayout
56-
android:layout_width="match_parent"
57-
android:layout_height="wrap_content"
58-
android:orientation="horizontal"
59-
android:layout_marginEnd="4dip"
60-
android:layout_marginStart="4dip"
61-
android:gravity="center_vertical"
62-
android:background="#70000000">
63-
64-
<!-- displays dots as user enters pin -->
65-
<EditText android:id="@+id/sim_pin_entry"
66-
android:layout_width="0dip"
67-
android:layout_height="wrap_content"
68-
android:layout_weight="1"
69-
android:maxLines="1"
70-
android:singleLine="true"
71-
android:gravity="center_horizontal"
72-
android:layout_gravity="center_vertical"
73-
android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
74-
android:textStyle="normal"
75-
android:inputType="textPassword"
76-
android:textSize="36sp"
77-
android:background="@null"
78-
android:textAppearance="?android:attr/textAppearanceMedium"
79-
android:textColor="#ffffffff"
80-
android:imeOptions="flagForceAscii|actionDone"
49+
android:gravity="center"
50+
android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
51+
android:singleLine="true"
52+
android:cursorVisible="false"
53+
android:background="@null"
54+
android:textAppearance="@style/TextAppearance.NumPadKey"
55+
android:imeOptions="flagForceAscii|actionDone"
8156
/>
82-
83-
<ImageButton android:id="@+id/delete_button"
84-
android:layout_width="wrap_content"
85-
android:layout_height="wrap_content"
86-
android:layout_gravity="center_vertical"
87-
android:src="@android:drawable/ic_input_delete"
88-
android:clickable="true"
89-
android:padding="8dip"
90-
android:background="?android:attr/selectableItemBackground"
91-
/>
92-
</LinearLayout>
93-
94-
<!-- Numeric keyboard -->
95-
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
96-
android:layout_width="match_parent"
97-
android:layout_height="wrap_content"
98-
android:layout_marginStart="4dip"
99-
android:layout_marginEnd="4dip"
100-
android:paddingTop="4dip"
101-
android:paddingBottom="4dip"
102-
android:background="#40000000"
103-
android:keyBackground="@*android:drawable/btn_keyboard_key_ics"
57+
<ImageButton android:id="@+id/delete_button"
58+
android:layout_width="wrap_content"
59+
android:layout_height="match_parent"
60+
android:gravity="center_vertical"
61+
android:src="@*android:drawable/ic_input_delete"
10462
android:clickable="true"
63+
android:paddingTop="8dip"
64+
android:paddingBottom="8dip"
65+
android:paddingLeft="24dp"
66+
android:paddingRight="24dp"
67+
android:background="?android:attr/selectableItemBackground"
68+
/>
69+
</LinearLayout>
70+
<View
71+
android:layout_width="wrap_content"
72+
android:layout_height="1dp"
73+
android:background="#55FFFFFF"
10574
/>
75+
<LinearLayout
76+
android:layout_width="match_parent"
77+
android:layout_height="0dp"
78+
android:layout_weight="1"
79+
android:orientation="horizontal"
80+
>
81+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
82+
android:id="@+id/key1"
83+
style="@style/Widget.Button.NumPadKey"
84+
android:layout_width="0px"
85+
android:layout_height="match_parent"
86+
android:layout_weight="1"
87+
androidprv:textView="@+id/pinEntry"
88+
androidprv:digit="1"
89+
/>
90+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
91+
android:id="@+id/key2"
92+
style="@style/Widget.Button.NumPadKey"
93+
android:layout_width="0px"
94+
android:layout_height="match_parent"
95+
android:layout_weight="1"
96+
androidprv:textView="@+id/pinEntry"
97+
androidprv:digit="2"
98+
/>
99+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
100+
android:id="@+id/key3"
101+
style="@style/Widget.Button.NumPadKey"
102+
android:layout_width="0px"
103+
android:layout_height="match_parent"
104+
android:layout_weight="1"
105+
androidprv:textView="@+id/pinEntry"
106+
androidprv:digit="3"
107+
/>
108+
</LinearLayout>
109+
<LinearLayout
110+
android:layout_width="match_parent"
111+
android:layout_height="0dp"
112+
android:layout_weight="1"
113+
android:orientation="horizontal"
114+
>
115+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
116+
android:id="@+id/key4"
117+
style="@style/Widget.Button.NumPadKey"
118+
android:layout_width="0px"
119+
android:layout_height="match_parent"
120+
android:layout_weight="1"
121+
androidprv:textView="@+id/pinEntry"
122+
androidprv:digit="4"
123+
/>
124+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
125+
android:id="@+id/key5"
126+
style="@style/Widget.Button.NumPadKey"
127+
android:layout_width="0px"
128+
android:layout_height="match_parent"
129+
android:layout_weight="1"
130+
androidprv:textView="@+id/pinEntry"
131+
androidprv:digit="5"
132+
/>
133+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
134+
android:id="@+id/key6"
135+
style="@style/Widget.Button.NumPadKey"
136+
android:layout_width="0px"
137+
android:layout_height="match_parent"
138+
android:layout_weight="1"
139+
androidprv:textView="@+id/pinEntry"
140+
androidprv:digit="6"
141+
/>
142+
</LinearLayout>
143+
<LinearLayout
144+
android:layout_width="match_parent"
145+
android:layout_height="0dp"
146+
android:orientation="horizontal"
147+
android:layout_weight="1"
148+
>
149+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
150+
android:id="@+id/key7"
151+
style="@style/Widget.Button.NumPadKey"
152+
android:layout_width="0px"
153+
android:layout_height="match_parent"
154+
android:layout_weight="1"
155+
androidprv:textView="@+id/pinEntry"
156+
androidprv:digit="7"
157+
/>
158+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
159+
android:id="@+id/key8"
160+
style="@style/Widget.Button.NumPadKey"
161+
android:layout_width="0px"
162+
android:layout_height="match_parent"
163+
android:layout_weight="1"
164+
androidprv:textView="@+id/pinEntry"
165+
androidprv:digit="8"
166+
/>
167+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
168+
android:id="@+id/key9"
169+
style="@style/Widget.Button.NumPadKey"
170+
android:layout_width="0px"
171+
android:layout_height="match_parent"
172+
android:layout_weight="1"
173+
androidprv:textView="@+id/pinEntry"
174+
androidprv:digit="9"
175+
/>
176+
</LinearLayout>
177+
<LinearLayout
178+
android:layout_width="match_parent"
179+
android:layout_height="0dp"
180+
android:layout_weight="1"
181+
android:orientation="horizontal"
182+
>
183+
<Space
184+
android:layout_width="0px"
185+
android:layout_height="match_parent"
186+
android:layout_weight="1"
187+
/>
188+
<view class="com.android.internal.policy.impl.keyguard.NumPadKey"
189+
android:id="@+id/key0"
190+
style="@style/Widget.Button.NumPadKey"
191+
android:layout_width="0px"
192+
android:layout_height="match_parent"
193+
android:layout_weight="1"
194+
androidprv:textView="@+id/pinEntry"
195+
androidprv:digit="0"
196+
/>
197+
<ImageButton
198+
android:id="@+id/key_enter"
199+
style="@style/Widget.Button.NumPadKey"
200+
android:gravity="center"
201+
android:layout_width="0px"
202+
android:layout_height="match_parent"
203+
android:layout_weight="1"
204+
android:src="@drawable/sym_keyboard_return_holo"
205+
/>
106206
</LinearLayout>
107207

108208
<include layout="@layout/keyguard_emergency_carrier_area"
109-
android:id="@+id/keyguard_selector_fade_container"
110-
android:layout_width="match_parent"
111-
android:layout_height="wrap_content"
112-
android:orientation="vertical"
113-
android:layout_gravity="bottom|center_horizontal"
114-
android:gravity="center_horizontal" />
209+
android:id="@+id/keyguard_selector_fade_container"
210+
android:layout_width="match_parent"
211+
android:layout_height="wrap_content"
212+
android:orientation="vertical"
213+
android:layout_gravity="bottom|center_horizontal"
214+
android:gravity="center_horizontal" />
115215

116216
</com.android.internal.policy.impl.keyguard.KeyguardSimPinView>

0 commit comments

Comments
 (0)