diff options
author | Jim Miller <jaggies@google.com> | 2011-04-15 18:52:31 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2011-04-15 18:52:31 -0700 |
commit | 74b1e0a7330af195621ad0965748bee66c46f4b6 (patch) | |
tree | 5f4c959ca923b1cc7fe08cd30aa8957292387955 | |
parent | 2c701570ebfbccc5a6a2ed271c965f75ed2149f0 (diff) | |
download | packages_apps_Settings-74b1e0a7330af195621ad0965748bee66c46f4b6.zip packages_apps_Settings-74b1e0a7330af195621ad0965748bee66c46f4b6.tar.gz packages_apps_Settings-74b1e0a7330af195621ad0965748bee66c46f4b6.tar.bz2 |
Fix 4283049: Restore continue/cancel buttons in LockScreen Settings
This fixes a bug where the continue/cancel buttons were missing
from LockScreen settings in landscape mode.
The change also includes a minor change to enable using the IME enter
key to proceed to the next step.
Change-Id: I2dca0b40e38a128cc0aa637f573da01e779edb73
-rw-r--r-- | res/layout-land/choose_lock_password.xml | 42 | ||||
-rw-r--r-- | res/layout-land/confirm_lock_password.xml | 1 | ||||
-rw-r--r-- | res/layout/choose_lock_password.xml | 1 | ||||
-rw-r--r-- | res/layout/confirm_lock_password.xml | 1 | ||||
-rw-r--r-- | src/com/android/settings/ChooseLockPassword.java | 6 | ||||
-rw-r--r-- | src/com/android/settings/ConfirmLockPassword.java | 6 |
6 files changed, 28 insertions, 29 deletions
diff --git a/res/layout-land/choose_lock_password.xml b/res/layout-land/choose_lock_password.xml index 10a01c7..005dd63 100644 --- a/res/layout-land/choose_lock_password.xml +++ b/res/layout-land/choose_lock_password.xml @@ -58,15 +58,10 @@ android:textAppearance="?android:attr/textAppearanceLarge" android:background="@drawable/password_field_default" android:textColor="#ffffffff" + android:imeOptions="actionNext|flagNoEnterAction" /> </LinearLayout> - <!-- Spacer between password entry and keyboard --> - <View - android:layout_width="match_parent" - android:layout_height="0dip" - android:layout_weight="1" /> - <!-- Alphanumeric keyboard --> <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard" android:layout_alignParentBottom="true" @@ -78,29 +73,26 @@ /> <RelativeLayout - android:layout_height="wrap_content" android:layout_width="match_parent" - android:background="@android:drawable/bottom_bar" - android:visibility="gone"> + android:layout_height="0dip" + android:layout_weight="1"> + <LinearLayout + style="@style/SecurityPreferenceButtonContainer" + android:orientation="horizontal" + android:layout_alignParentRight="true" + android:layout_alignParentBottom="true"> - <Button android:id="@+id/cancel_button" - android:layout_width="150dip" - android:layout_height="wrap_content" - android:layout_margin="5dip" - android:layout_alignParentLeft="true" - android:text="@string/lockpassword_cancel_label" - /> + <!-- left : cancel --> + <Button android:id="@+id/cancel_button" + style="@style/SecurityPreferenceButton" + android:text="@string/lockpassword_cancel_label"/> - <Button android:id="@+id/next_button" - android:layout_width="150dip" - android:layout_height="wrap_content" - android:layout_margin="5dip" - android:layout_alignParentRight="true" - android:drawableRight="@drawable/ic_btn_next" - android:drawablePadding="10dip" - android:text="@string/lockpassword_continue_label" - /> + <!-- right : continue --> + <Button android:id="@+id/next_button" + style="@style/SecurityPreferenceButton" + android:text="@string/lockpassword_continue_label"/> + </LinearLayout> </RelativeLayout> </LinearLayout> diff --git a/res/layout-land/confirm_lock_password.xml b/res/layout-land/confirm_lock_password.xml index 4138be1..e5580eb 100644 --- a/res/layout-land/confirm_lock_password.xml +++ b/res/layout-land/confirm_lock_password.xml @@ -59,6 +59,7 @@ android:textAppearance="?android:attr/textAppearanceLarge" android:background="@drawable/password_field_default" android:textColor="#ffffffff" + android:imeOptions="actionNext|flagNoEnterAction" /> </LinearLayout> diff --git a/res/layout/choose_lock_password.xml b/res/layout/choose_lock_password.xml index a854b9a..958cc16 100644 --- a/res/layout/choose_lock_password.xml +++ b/res/layout/choose_lock_password.xml @@ -54,6 +54,7 @@ android:textAppearance="?android:attr/textAppearanceLarge" android:background="@drawable/password_field_default" android:textColor="#ffffffff" + android:imeOptions="actionNext|flagNoEnterAction" /> <!-- Spacer between password entry and keyboard --> diff --git a/res/layout/confirm_lock_password.xml b/res/layout/confirm_lock_password.xml index 308228b..21eecc2 100644 --- a/res/layout/confirm_lock_password.xml +++ b/res/layout/confirm_lock_password.xml @@ -57,6 +57,7 @@ android:textAppearance="?android:attr/textAppearanceLarge" android:background="@drawable/password_field_default" android:textColor="#ffffffff" + android:imeOptions="actionNext|flagNoEnterAction" /> <!-- Spacer between password entry and keyboard --> diff --git a/src/com/android/settings/ChooseLockPassword.java b/src/com/android/settings/ChooseLockPassword.java index a0f2346..96255eb 100644 --- a/src/com/android/settings/ChooseLockPassword.java +++ b/src/com/android/settings/ChooseLockPassword.java @@ -405,8 +405,10 @@ public class ChooseLockPassword extends PreferenceActivity { } public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { - // Check if this was the result of hitting the enter key - if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_DOWN) { + // Check if this was the result of hitting the enter or "done" key + if (actionId == EditorInfo.IME_NULL + || actionId == EditorInfo.IME_ACTION_DONE + || actionId == EditorInfo.IME_ACTION_NEXT) { handleNext(); return true; } diff --git a/src/com/android/settings/ConfirmLockPassword.java b/src/com/android/settings/ConfirmLockPassword.java index 3f4a4f3..7b7b103 100644 --- a/src/com/android/settings/ConfirmLockPassword.java +++ b/src/com/android/settings/ConfirmLockPassword.java @@ -173,8 +173,10 @@ public class ConfirmLockPassword extends PreferenceActivity { } public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { - // Check if this was the result of hitting the enter key - if (actionId == EditorInfo.IME_NULL) { + // Check if this was the result of hitting the enter or "done" key + if (actionId == EditorInfo.IME_NULL + || actionId == EditorInfo.IME_ACTION_DONE + || actionId == EditorInfo.IME_ACTION_NEXT) { handleNext(); return true; } |