Skip to content

Commit 8f7e1be

Browse files
sganovAndroid (Google) Code Review
authored andcommitted
Merge "Addressing comments in 74bdd21." into jb-mr1-lockscreen-dev
2 parents 1e44e96 + 0f87a72 commit 8f7e1be

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

core/res/res/layout-port/keyguard_host_view.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
</com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer>
7070

7171
<ImageButton
72-
android:layout_width="wrap_content"
73-
android:layout_height="wrap_content"
72+
android:layout_width="match_parent"
73+
android:layout_height="@dimen/kg_widget_pager_bottom_padding"
7474
androidprv:layout_childType="expandChallengeHandle"
7575
android:focusable="true"
7676
android:background="@null"

policy/src/com/android/internal/policy/impl/keyguard/SlidingChallengeLayout.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,12 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
884884
child.setAlpha(getChallengeAlpha());
885885
child.layout(left, bottom - childHeight, left + childWidth, bottom);
886886
} else if (lp.childType == LayoutParams.CHILD_TYPE_EXPAND_CHALLENGE_HANDLE) {
887-
child.layout(0, b - mChallengeBottomBound, width, b);
887+
final int center = (paddingLeft + width - paddingRight) / 2;
888+
final int left = center - child.getMeasuredWidth() / 2;
889+
final int right = left + child.getMeasuredWidth();
890+
final int bottom = height - paddingBottom - lp.bottomMargin;
891+
final int top = bottom - child.getMeasuredHeight();
892+
child.layout(left, top, right, bottom);
888893
} else {
889894
// Non-challenge views lay out from the upper left, layered.
890895
child.layout(paddingLeft + lp.leftMargin,

0 commit comments

Comments
 (0)