diff options
Diffstat (limited to 'core')
4 files changed, 39 insertions, 13 deletions
diff --git a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java index 366b983..01df48a 100644 --- a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java +++ b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java @@ -48,11 +48,11 @@ public class PasswordEntryKeyboardHelper implements OnKeyboardActionListener { private PasswordEntryKeyboard mSymbolsKeyboard; private PasswordEntryKeyboard mSymbolsKeyboardShifted; private PasswordEntryKeyboard mNumericKeyboard; - private Context mContext; - private View mTargetView; - private KeyboardView mKeyboardView; + private final Context mContext; + private final View mTargetView; + private final KeyboardView mKeyboardView; private long[] mVibratePattern; - private Vibrator mVibrator; + private final Vibrator mVibrator; public PasswordEntryKeyboardHelper(Context context, KeyboardView keyboardView, View targetView) { this(context, keyboardView, targetView, true); @@ -228,7 +228,7 @@ public class PasswordEntryKeyboardHelper implements OnKeyboardActionListener { } } - private void handleBackspace() { + public void handleBackspace() { sendDownUpKeyEvents(KeyEvent.KEYCODE_DEL); } diff --git a/core/res/res/layout/keyguard_screen_password_landscape.xml b/core/res/res/layout/keyguard_screen_password_landscape.xml index 8bc5f34..e34822d 100644 --- a/core/res/res/layout/keyguard_screen_password_landscape.xml +++ b/core/res/res/layout/keyguard_screen_password_landscape.xml @@ -135,7 +135,8 @@ <LinearLayout android:orientation="horizontal" android:layout_width="270dip" - android:layout_gravity="center_vertical"> + android:layout_gravity="center_vertical" + android:background="@drawable/lockscreen_password_field_dark"> <EditText android:id="@+id/passwordEntry" android:layout_height="wrap_content" @@ -148,11 +149,23 @@ android:textSize="24sp" android:minEms="8" android:textAppearance="?android:attr/textAppearanceMedium" - android:background="@drawable/lockscreen_password_field_dark" + android:background="@null" android:textColor="?android:attr/textColorPrimary" android:imeOptions="flagNoFullscreen|actionDone" /> + <!-- This delete button is only visible for numeric PIN entry --> + <ImageButton android:id="@+id/pinDel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@android:drawable/ic_input_delete" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" + /> + <ImageView android:id="@+id/switch_ime_button" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/core/res/res/layout/keyguard_screen_password_portrait.xml b/core/res/res/layout/keyguard_screen_password_portrait.xml index 2a66d7d..e1280ba 100644 --- a/core/res/res/layout/keyguard_screen_password_portrait.xml +++ b/core/res/res/layout/keyguard_screen_password_portrait.xml @@ -95,9 +95,12 @@ /> <!-- Password entry field --> + <!-- Note: the entire container is styled to look like the edit field, + since the backspace/IME switcher looks better inside --> <LinearLayout android:layout_gravity="center_vertical|fill_horizontal" android:orientation="horizontal" + android:background="@drawable/lockscreen_password_field_dark" android:layout_marginLeft="16dip" android:layout_marginRight="16dip"> @@ -110,12 +113,24 @@ android:textStyle="normal" android:inputType="textPassword" android:textSize="36sp" - android:background="@drawable/lockscreen_password_field_dark" + android:background="@null" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#ffffffff" android:imeOptions="actionDone" /> + <!-- This delete button is only visible for numeric PIN entry --> + <ImageButton android:id="@+id/pinDel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@android:drawable/ic_input_delete" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center_vertical" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" + /> + <ImageView android:id="@+id/switch_ime_button" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/core/res/res/xml/password_kbd_numeric.xml b/core/res/res/xml/password_kbd_numeric.xml index 2fd5aa0..560f867 100755 --- a/core/res/res/xml/password_kbd_numeric.xml +++ b/core/res/res/xml/password_kbd_numeric.xml @@ -49,12 +49,10 @@ </Row> <Row android:rowEdgeFlags="bottom"> + <Key android:codes="48" android:keyIcon="@drawable/sym_keyboard_num0_no_plus" + android:keyWidth="66.66%p" android:keyEdgeFlags="left"/> <Key android:codes="10" android:keyIcon="@drawable/sym_keyboard_ok" - android:keyEdgeFlags="left"/> - <Key android:codes="48" android:keyIcon="@drawable/sym_keyboard_num0_no_plus"/> - <Key android:codes="-5" android:keyIcon="@drawable/sym_keyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:isRepeatable="true" android:keyEdgeFlags="right"/> + android:keyEdgeFlags="right"/> </Row> </Keyboard> |