Skip to content

Commit 80bc85a

Browse files
committed
Improve PIN key layouts.
- space between digit and mnemonics - better center the (left-aligned) text in its container - nudge the enter arrow a little to the left in its container - add missing contentDescriptions for SIMPIN/PUK Bug: 7427380 Change-Id: I0f5d9d1554a476c00591981028733ee6924bb729
1 parent 1ec4646 commit 80bc85a

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

core/res/res/layout/keyguard_pin_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@
193193
<ImageButton
194194
android:id="@+id/key_enter"
195195
style="@style/Widget.Button.NumPadKey"
196-
android:gravity="center"
197196
android:layout_width="0px"
198197
android:layout_height="match_parent"
199198
android:layout_weight="1"
199+
android:paddingRight="30dp"
200200
android:src="@drawable/sym_keyboard_return_holo"
201201
android:contentDescription="@string/keyboardview_keycode_enter"
202202
/>

core/res/res/layout/keyguard_sim_pin_view.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
android:paddingLeft="24dp"
6666
android:paddingRight="24dp"
6767
android:background="?android:attr/selectableItemBackground"
68+
android:contentDescription="@string/keyboardview_keycode_delete"
6869
/>
6970
</LinearLayout>
7071
<View
@@ -197,11 +198,12 @@
197198
<ImageButton
198199
android:id="@+id/key_enter"
199200
style="@style/Widget.Button.NumPadKey"
200-
android:gravity="center"
201201
android:layout_width="0px"
202202
android:layout_height="match_parent"
203203
android:layout_weight="1"
204+
android:paddingRight="30dp"
204205
android:src="@drawable/sym_keyboard_return_holo"
206+
android:contentDescription="@string/keyboardview_keycode_enter"
205207
/>
206208
</LinearLayout>
207209

core/res/res/layout/keyguard_sim_puk_view.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
android:paddingLeft="24dp"
6767
android:paddingRight="24dp"
6868
android:background="?android:attr/selectableItemBackground"
69+
android:contentDescription="@string/keyboardview_keycode_delete"
6970
/>
7071
</LinearLayout>
7172
<View
@@ -198,11 +199,12 @@
198199
<ImageButton
199200
android:id="@+id/key_enter"
200201
style="@style/Widget.Button.NumPadKey"
201-
android:gravity="center"
202202
android:layout_width="0px"
203203
android:layout_height="match_parent"
204204
android:layout_weight="1"
205+
android:paddingRight="30dp"
205206
android:src="@drawable/sym_keyboard_return_holo"
207+
android:contentDescription="@string/keyboardview_keycode_enter"
206208
/>
207209
</LinearLayout>
208210

core/res/res/values/styles.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2482,13 +2482,14 @@ please see styles_device_defaults.xml.
24822482
<style name="Widget.Button.NumPadKey"
24832483
parent="@android:style/Widget.Button">
24842484
<item name="android:singleLine">true</item>
2485-
<item name="android:padding">6dip</item>
24862485
<item name="android:gravity">left|center_vertical</item>
24872486
<item name="android:background">?android:attr/selectableItemBackground</item>
24882487
<item name="android:textSize">34dp</item>
24892488
<item name="android:fontFamily">sans-serif</item>
24902489
<item name="android:textStyle">normal</item>
24912490
<item name="android:textColor">#ffffff</item>
2491+
<item name="android:paddingBottom">10dp</item>
2492+
<item name="android:paddingLeft">20dp</item>
24922493
</style>
24932494
<style name="TextAppearance.NumPadKey"
24942495
parent="@android:style/TextAppearance">

policy/src/com/android/internal/policy/impl/keyguard/NumPadKey.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public NumPadKey(Context context, AttributeSet attrs, int defStyle) {
9090
final String extra = sKlondike[mDigit];
9191
final int extraLen = extra.length();
9292
if (extraLen > 0) {
93+
builder.append(" ");
9394
builder.append(extra);
9495
builder.setSpan(
9596
new TextAppearanceSpan(context, R.style.TextAppearance_NumPadKey_Klondike),

0 commit comments

Comments
 (0)