diff --git a/core/res/res/layout-port/keyguard_host_view.xml b/core/res/res/layout-port/keyguard_host_view.xml index 3ce9365af0925..20726d0050bba 100644 --- a/core/res/res/layout-port/keyguard_host_view.xml +++ b/core/res/res/layout-port/keyguard_host_view.xml @@ -29,15 +29,14 @@ + android:layout_height="153dp" /> + android:layout_marginBottom="-80dp"/> \ No newline at end of file diff --git a/core/res/res/layout/keyguard_password_view.xml b/core/res/res/layout/keyguard_password_view.xml index 92a755150553c..ab8aa85ba55c2 100644 --- a/core/res/res/layout/keyguard_password_view.xml +++ b/core/res/res/layout/keyguard_password_view.xml @@ -26,11 +26,12 @@ + android:layout_height="0dp" + android:layout_weight="1"> @@ -114,14 +115,14 @@ android:clickable="true" /> - - + + diff --git a/core/res/res/layout/keyguard_screen_password_landscape.xml b/core/res/res/layout/keyguard_screen_password_landscape.xml index e0a3ce3c13c0f..80d9d61a007ed 100644 --- a/core/res/res/layout/keyguard_screen_password_landscape.xml +++ b/core/res/res/layout/keyguard_screen_password_landscape.xml @@ -143,7 +143,6 @@ android:layout_width="0dip" android:layout_weight="1" android:gravity="center" - android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left" android:layout_gravity="center_vertical" android:singleLine="true" android:textStyle="normal" diff --git a/core/res/res/layout/keyguard_screen_password_portrait.xml b/core/res/res/layout/keyguard_screen_password_portrait.xml index 0212f737c034e..3d61bae5f8fb5 100644 --- a/core/res/res/layout/keyguard_screen_password_portrait.xml +++ b/core/res/res/layout/keyguard_screen_password_portrait.xml @@ -106,12 +106,10 @@ android:layout_marginEnd="16dip"> - - - + + android:layout_marginEnd="@dimen/kg_status_line_font_right_margin" + android:layout_gravity="right"> - + - + + + + diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 31d4ad7275e9b..948a3d3c40c80 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -291,10 +291,10 @@ 16dp - 16dp + 0dp - 6dp + 0dp diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java index 5a1c30f385b55..a6e8f5bc91fc8 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java @@ -207,12 +207,13 @@ public class KeyguardPasswordView extends LinearLayout }); } - // If no icon is visible, reset the left margin on the password field so the text is + // If no icon is visible, reset the start margin on the password field so the text is // still centered. if (!imeOrDeleteButtonVisible) { android.view.ViewGroup.LayoutParams params = mPasswordEntry.getLayoutParams(); if (params instanceof MarginLayoutParams) { - ((MarginLayoutParams)params).leftMargin = 0; + final MarginLayoutParams mlp = (MarginLayoutParams) params; + mlp.setMarginStart(0); mPasswordEntry.setLayoutParams(params); } } diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java index 1ec4176596f94..0ad2404c7d4aa 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java @@ -210,6 +210,18 @@ public class KeyguardViewManager { mKeyguardView.setLockPatternUtils(mLockPatternUtils); mKeyguardView.setViewMediatorCallback(mViewMediatorCallback); + // HACK + // The keyguard view will have set up window flags in onFinishInflate before we set + // the view mediator callback. Make sure it knows the correct IME state. + if (mViewMediatorCallback != null) { + KeyguardPasswordView kpv = (KeyguardPasswordView) mKeyguardView.findViewById( + R.id.keyguard_password_view); + + if (kpv != null) { + mViewMediatorCallback.setNeedsInput(kpv.needsInput()); + } + } + if (options != null) { if (options.getBoolean(LockPatternUtils.KEYGUARD_SHOW_USER_SWITCHER)) { mKeyguardView.goToUserSwitcher();