Skip to content

Commit 0f87a72

Browse files
committed
Addressing comments in 74bdd21.
Change-Id: I807733dabc18bc8894c777d19c4d0e3ca809476c
1 parent 45942ca commit 0f87a72

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
@@ -891,7 +891,12 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
891891
child.setAlpha(getChallengeAlpha());
892892
child.layout(left, bottom - childHeight, left + childWidth, bottom);
893893
} else if (lp.childType == LayoutParams.CHILD_TYPE_EXPAND_CHALLENGE_HANDLE) {
894-
child.layout(0, b - mChallengeBottomBound, width, b);
894+
final int center = (paddingLeft + width - paddingRight) / 2;
895+
final int left = center - child.getMeasuredWidth() / 2;
896+
final int right = left + child.getMeasuredWidth();
897+
final int bottom = height - paddingBottom - lp.bottomMargin;
898+
final int top = bottom - child.getMeasuredHeight();
899+
child.layout(left, top, right, bottom);
895900
} else {
896901
// Non-challenge views lay out from the upper left, layered.
897902
child.layout(paddingLeft + lp.leftMargin,

0 commit comments

Comments
 (0)