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
This commit is contained in:
@@ -58,15 +58,10 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:background="@drawable/password_field_default"
|
android:background="@drawable/password_field_default"
|
||||||
android:textColor="#ffffffff"
|
android:textColor="#ffffffff"
|
||||||
|
android:imeOptions="actionNext|flagNoEnterAction"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Spacer between password entry and keyboard -->
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dip"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<!-- Alphanumeric keyboard -->
|
<!-- Alphanumeric keyboard -->
|
||||||
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
@@ -78,29 +73,26 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:background="@android:drawable/bottom_bar"
|
android:layout_height="0dip"
|
||||||
android:visibility="gone">
|
android:layout_weight="1">
|
||||||
|
<LinearLayout
|
||||||
<Button android:id="@+id/cancel_button"
|
style="@style/SecurityPreferenceButtonContainer"
|
||||||
android:layout_width="150dip"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="5dip"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
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:layout_alignParentRight="true"
|
||||||
android:drawableRight="@drawable/ic_btn_next"
|
android:layout_alignParentBottom="true">
|
||||||
android:drawablePadding="10dip"
|
|
||||||
android:text="@string/lockpassword_continue_label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
<!-- left : cancel -->
|
||||||
|
<Button android:id="@+id/cancel_button"
|
||||||
|
style="@style/SecurityPreferenceButton"
|
||||||
|
android:text="@string/lockpassword_cancel_label"/>
|
||||||
|
|
||||||
|
<!-- right : continue -->
|
||||||
|
<Button android:id="@+id/next_button"
|
||||||
|
style="@style/SecurityPreferenceButton"
|
||||||
|
android:text="@string/lockpassword_continue_label"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -59,6 +59,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:background="@drawable/password_field_default"
|
android:background="@drawable/password_field_default"
|
||||||
android:textColor="#ffffffff"
|
android:textColor="#ffffffff"
|
||||||
|
android:imeOptions="actionNext|flagNoEnterAction"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@@ -54,6 +54,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:background="@drawable/password_field_default"
|
android:background="@drawable/password_field_default"
|
||||||
android:textColor="#ffffffff"
|
android:textColor="#ffffffff"
|
||||||
|
android:imeOptions="actionNext|flagNoEnterAction"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Spacer between password entry and keyboard -->
|
<!-- Spacer between password entry and keyboard -->
|
||||||
|
@@ -57,6 +57,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:background="@drawable/password_field_default"
|
android:background="@drawable/password_field_default"
|
||||||
android:textColor="#ffffffff"
|
android:textColor="#ffffffff"
|
||||||
|
android:imeOptions="actionNext|flagNoEnterAction"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Spacer between password entry and keyboard -->
|
<!-- Spacer between password entry and keyboard -->
|
||||||
|
@@ -405,8 +405,10 @@ public class ChooseLockPassword extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
// Check if this was the result of hitting the enter key
|
// Check if this was the result of hitting the enter or "done" key
|
||||||
if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_DOWN) {
|
if (actionId == EditorInfo.IME_NULL
|
||||||
|
|| actionId == EditorInfo.IME_ACTION_DONE
|
||||||
|
|| actionId == EditorInfo.IME_ACTION_NEXT) {
|
||||||
handleNext();
|
handleNext();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -173,8 +173,10 @@ public class ConfirmLockPassword extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
// Check if this was the result of hitting the enter key
|
// Check if this was the result of hitting the enter or "done" key
|
||||||
if (actionId == EditorInfo.IME_NULL) {
|
if (actionId == EditorInfo.IME_NULL
|
||||||
|
|| actionId == EditorInfo.IME_ACTION_DONE
|
||||||
|
|| actionId == EditorInfo.IME_ACTION_NEXT) {
|
||||||
handleNext();
|
handleNext();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user