am 85341a76: Merge "Fix keyguard dimensions; IME state for password view; layouts" into jb-mr1-dev
* commit '85341a76677abcccee757f7982b48b3bec2dcf63': Fix keyguard dimensions; IME state for password view; layouts
This commit is contained in:
@@ -29,15 +29,14 @@
|
||||
|
||||
<include layout="@layout/keyguard_widget_region"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="27" />
|
||||
android:layout_height="153dp" />
|
||||
|
||||
<com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper
|
||||
android:id="@+id/view_flipper"
|
||||
android:layout_height="0dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:layout_weight="73"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="@dimen/keyguard_security_view_margin"
|
||||
android:paddingTop="@dimen/keyguard_security_view_margin"
|
||||
android:paddingRight="@dimen/keyguard_security_view_margin"
|
||||
|
||||
@@ -89,7 +89,6 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left"
|
||||
android:singleLine="true"
|
||||
android:textStyle="normal"
|
||||
android:inputType="textPassword"
|
||||
|
||||
@@ -93,7 +93,6 @@
|
||||
android:inputType="textPassword"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left"
|
||||
android:textSize="24sp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:background="@null"
|
||||
|
||||
@@ -22,5 +22,5 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="-96dp"/>
|
||||
android:layout_marginBottom="-80dp"/>
|
||||
</merge>
|
||||
@@ -26,11 +26,12 @@
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center">
|
||||
|
||||
@@ -114,14 +115,14 @@
|
||||
android:clickable="true"
|
||||
/>
|
||||
</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>
|
||||
</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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -106,12 +106,10 @@
|
||||
android:layout_marginEnd="16dip">
|
||||
|
||||
<EditText android:id="@+id/passwordEntry"
|
||||
android:layout_width="0dip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left"
|
||||
android:singleLine="true"
|
||||
android:textStyle="normal"
|
||||
android:inputType="textPassword"
|
||||
|
||||
@@ -33,28 +33,32 @@
|
||||
android:gravity="center_horizontal|top"
|
||||
android:contentDescription="@*android:string/keyguard_accessibility_status">
|
||||
|
||||
<com.android.internal.policy.impl.keyguard.ClockView
|
||||
android:id="@+id/clock_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/kg_clock_top_margin"
|
||||
android:layout_marginEnd="@dimen/kg_status_line_font_right_margin"
|
||||
android:layout_gravity="right">
|
||||
|
||||
<TextView android:id="@+id/clock_text"
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
<com.android.internal.policy.impl.keyguard.ClockView
|
||||
android:id="@+id/clock_view"
|
||||
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"
|
||||
/>
|
||||
android:layout_marginEnd="@dimen/kg_status_line_font_right_margin"
|
||||
android:layout_gravity="right">
|
||||
|
||||
</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.KeyguardWidgetFrame>
|
||||
|
||||
@@ -291,10 +291,10 @@
|
||||
<dimen name="kg_widget_pager_horizontal_padding">16dp</dimen>
|
||||
|
||||
<!-- 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 -->
|
||||
<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
|
||||
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.
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user