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

Commit 35948b7e authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 5199326 - ListView's fast scroller is out of sync with contents

Also fix a bug where the fast scroll track was not being properly
invalidated while animating out.

Change-Id: Ie90568a993699d5d061985985e3d93165d1d2219
parent df7332aa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -368,6 +368,8 @@ class FastScroller {
        } else if (mState == STATE_EXIT) {
            if (alpha == 0) { // Done with exit
                setState(STATE_NONE);
            } else if (mTrackDrawable != null) {
                mList.invalidate(viewWidth - mThumbW, 0, viewWidth, mList.getHeight());
            } else {
                mList.invalidate(viewWidth - mThumbW, y, viewWidth, y + mThumbH);
            }
@@ -597,7 +599,7 @@ class FastScroller {

    private int getThumbPositionForListPosition(int firstVisibleItem, int visibleItemCount,
            int totalItemCount) {
        if (mSectionIndexer == null) {
        if (mSectionIndexer == null || mListAdapter == null) {
            getSectionsFromIndexer();
        }
        if (mSectionIndexer == null || !mMatchDragPosition) {