Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76df4577 authored by Katherine Kuan's avatar Katherine Kuan
Browse files

Fix "<N> contacts" label in tablet contact list

- When scrolling the contact list, the "<N contacts>"
label jumps by about 20dip because the mPaddingRight
value is accounted for twice in the layout.

Bug: 5429921

Change-Id: I375fe1ffe4ab82a4003f9d30f7bb2327e7aeac58
parent 3443a634
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -113,8 +113,9 @@ public class ContactListPinnedHeaderView extends ViewGroup {

    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        int width = right - left - mPaddingRight;
        int width = right - left;

        // Take into account left and right padding when laying out the below views.
        mHeaderTextView.layout(mHeaderTextIndent + mPaddingLeft,
                0,
                mHeaderTextView.getMeasuredWidth() + mHeaderTextIndent + mPaddingLeft,
@@ -129,7 +130,7 @@ public class ContactListPinnedHeaderView extends ViewGroup {

        mHeaderDivider.layout(mPaddingLeft,
                mHeaderBackgroundHeight,
                width,
                width - mPaddingRight,
                mHeaderBackgroundHeight + mHeaderUnderlineHeight);
    }