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

Commit 9c129d59 authored by John Shao's avatar John Shao
Browse files

Can't select first contact in multiselect mode

Intercept handler was intercepting touch events thinking
they were made on the header since adjustment was not made
for RTL.

Force set content description for header

Bug: 29996629
Bug: 29155704
Change-Id: Ifa537a494de06eece8cda2cdf25d0b8436eeb6fe
parent d5403fac
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1007,6 +1007,8 @@ public class ContactListItemView extends ViewGroup
        if (ContactsSectionIndexer.BLANK_HEADER_STRING.equals(title)) {
            headerTextView.setContentDescription(
                    getContext().getString(R.string.description_no_name_header));
        } else {
            headerTextView.setContentDescription(title);
        }
        headerTextView.setVisibility(View.VISIBLE);
    }
+4 −4
Original line number Diff line number Diff line
@@ -428,9 +428,9 @@ public class PinnedHeaderListView extends AutoScrollListView
            final int x = (int)ev.getX();
            for (int i = mSize; --i >= 0;) {
                PinnedHeader header = mHeaders[i];
                // For RTL layouts, this also takes into account that the scrollbar is on the left
                // side.
                final int padding = getPaddingLeft();
                final int padding = ViewUtil.isViewLayoutRtl(this) ?
                        getWidth() - mHeaderPaddingStart - header.view.getWidth() :
                        mHeaderPaddingStart;
                if (header.visible && header.y <= y && header.y + header.height > y &&
                        x >= padding && padding + header.view.getWidth() >= x) {
                    mHeaderTouched = true;
@@ -456,7 +456,7 @@ public class PinnedHeaderListView extends AutoScrollListView
            return true;
        }
        return super.onTouchEvent(ev);
    };
    }

    private boolean smoothScrollToPartition(int partition) {
        if (mAdapter == null) {