Merge "Fix keyguard dimensions; IME state for password view; layouts" into jb-mr1-dev
This commit is contained in:
@@ -29,15 +29,14 @@
|
|||||||
|
|
||||||
<include layout="@layout/keyguard_widget_region"
|
<include layout="@layout/keyguard_widget_region"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="153dp" />
|
||||||
android:layout_weight="27" />
|
|
||||||
|
|
||||||
<com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper
|
<com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper
|
||||||
android:id="@+id/view_flipper"
|
android:id="@+id/view_flipper"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:layout_weight="73"
|
android:layout_weight="1"
|
||||||
android:paddingLeft="@dimen/keyguard_security_view_margin"
|
android:paddingLeft="@dimen/keyguard_security_view_margin"
|
||||||
android:paddingTop="@dimen/keyguard_security_view_margin"
|
android:paddingTop="@dimen/keyguard_security_view_margin"
|
||||||
android:paddingRight="@dimen/keyguard_security_view_margin"
|
android:paddingRight="@dimen/keyguard_security_view_margin"
|
||||||
|
|||||||
@@ -89,7 +89,6 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left"
|
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textStyle="normal"
|
android:textStyle="normal"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
|
|||||||
@@ -93,7 +93,6 @@
|
|||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left"
|
|
||||||
android:textSize="24sp"
|
android:textSize="24sp"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
|
|||||||
@@ -22,5 +22,5 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|center_horizontal"
|
android:layout_gravity="bottom|center_horizontal"
|
||||||
android:layout_marginBottom="-96dp"/>
|
android:layout_marginBottom="-80dp"/>
|
||||||
</merge>
|
</merge>
|
||||||
@@ -26,11 +26,12 @@
|
|||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
@@ -114,14 +115,14 @@
|
|||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<include layout="@layout/keyguard_emergency_carrier_area"
|
|
||||||
android:id="@+id/keyguard_selector_fade_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_gravity="bottom|center_horizontal"
|
|
||||||
android:gravity="center_horizontal" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
<include layout="@layout/keyguard_emergency_carrier_area"
|
||||||
|
android:id="@+id/keyguard_selector_fade_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_gravity="bottom|center_horizontal"
|
||||||
|
android:gravity="center_horizontal" />
|
||||||
|
|
||||||
</com.android.internal.policy.impl.keyguard.KeyguardPasswordView>
|
</com.android.internal.policy.impl.keyguard.KeyguardPasswordView>
|
||||||
|
|||||||
@@ -143,7 +143,6 @@
|
|||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textStyle="normal"
|
android:textStyle="normal"
|
||||||
|
|||||||
@@ -106,12 +106,10 @@
|
|||||||
android:layout_marginEnd="16dip">
|
android:layout_marginEnd="16dip">
|
||||||
|
|
||||||
<EditText android:id="@+id/passwordEntry"
|
<EditText android:id="@+id/passwordEntry"
|
||||||
android:layout_width="0dip"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left"
|
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textStyle="normal"
|
android:textStyle="normal"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
|
|||||||
@@ -33,28 +33,32 @@
|
|||||||
android:gravity="center_horizontal|top"
|
android:gravity="center_horizontal|top"
|
||||||
android:contentDescription="@*android:string/keyguard_accessibility_status">
|
android:contentDescription="@*android:string/keyguard_accessibility_status">
|
||||||
|
|
||||||
<com.android.internal.policy.impl.keyguard.ClockView
|
<LinearLayout android:layout_width="match_parent"
|
||||||
android:id="@+id/clock_view"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_height="wrap_content"
|
android:orientation="vertical">
|
||||||
android:layout_marginTop="@dimen/kg_clock_top_margin"
|
<com.android.internal.policy.impl.keyguard.ClockView
|
||||||
android:layout_marginEnd="@dimen/kg_status_line_font_right_margin"
|
android:id="@+id/clock_view"
|
||||||
android:layout_gravity="right">
|
|
||||||
|
|
||||||
<TextView android:id="@+id/clock_text"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
android:layout_marginEnd="@dimen/kg_status_line_font_right_margin"
|
||||||
android:ellipsize="none"
|
android:layout_gravity="right">
|
||||||
android:textSize="@dimen/kg_status_clock_font_size"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:textColor="#ffffffff"
|
|
||||||
android:drawablePadding="2dip"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</com.android.internal.policy.impl.keyguard.ClockView>
|
<TextView android:id="@+id/clock_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:textSize="@dimen/kg_status_clock_font_size"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:textColor="#ffffffff"
|
||||||
|
android:drawablePadding="2dip"
|
||||||
|
/>
|
||||||
|
|
||||||
<include layout="@layout/keyguard_status_area" />
|
</com.android.internal.policy.impl.keyguard.ClockView>
|
||||||
|
|
||||||
|
<include layout="@layout/keyguard_status_area" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</com.android.internal.policy.impl.keyguard.KeyguardStatusView>
|
</com.android.internal.policy.impl.keyguard.KeyguardStatusView>
|
||||||
</com.android.internal.policy.impl.keyguard.KeyguardWidgetFrame>
|
</com.android.internal.policy.impl.keyguard.KeyguardWidgetFrame>
|
||||||
|
|||||||
@@ -291,10 +291,10 @@
|
|||||||
<dimen name="kg_widget_pager_horizontal_padding">16dp</dimen>
|
<dimen name="kg_widget_pager_horizontal_padding">16dp</dimen>
|
||||||
|
|
||||||
<!-- Top padding for the widget pager -->
|
<!-- Top padding for the widget pager -->
|
||||||
<dimen name="kg_widget_pager_top_padding">16dp</dimen>
|
<dimen name="kg_widget_pager_top_padding">0dp</dimen>
|
||||||
|
|
||||||
<!-- Bottom padding for the widget pager -->
|
<!-- Bottom padding for the widget pager -->
|
||||||
<dimen name="kg_widget_pager_bottom_padding">6dp</dimen>
|
<dimen name="kg_widget_pager_bottom_padding">0dp</dimen>
|
||||||
|
|
||||||
<!-- Top margin for the runway lights. We add a negative margin in large
|
<!-- Top margin for the runway lights. We add a negative margin in large
|
||||||
devices to account for the widget pager padding -->
|
devices to account for the widget pager padding -->
|
||||||
|
|||||||
@@ -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.
|
// still centered.
|
||||||
if (!imeOrDeleteButtonVisible) {
|
if (!imeOrDeleteButtonVisible) {
|
||||||
android.view.ViewGroup.LayoutParams params = mPasswordEntry.getLayoutParams();
|
android.view.ViewGroup.LayoutParams params = mPasswordEntry.getLayoutParams();
|
||||||
if (params instanceof MarginLayoutParams) {
|
if (params instanceof MarginLayoutParams) {
|
||||||
((MarginLayoutParams)params).leftMargin = 0;
|
final MarginLayoutParams mlp = (MarginLayoutParams) params;
|
||||||
|
mlp.setMarginStart(0);
|
||||||
mPasswordEntry.setLayoutParams(params);
|
mPasswordEntry.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,6 +210,18 @@ public class KeyguardViewManager {
|
|||||||
mKeyguardView.setLockPatternUtils(mLockPatternUtils);
|
mKeyguardView.setLockPatternUtils(mLockPatternUtils);
|
||||||
mKeyguardView.setViewMediatorCallback(mViewMediatorCallback);
|
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 != null) {
|
||||||
if (options.getBoolean(LockPatternUtils.KEYGUARD_SHOW_USER_SWITCHER)) {
|
if (options.getBoolean(LockPatternUtils.KEYGUARD_SHOW_USER_SWITCHER)) {
|
||||||
mKeyguardView.goToUserSwitcher();
|
mKeyguardView.goToUserSwitcher();
|
||||||
|
|||||||
Reference in New Issue
Block a user