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

Commit d63d3358 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 3362258 - Fastscroll is out of sync with the list" into honeycomb

parents 2bc6971d b1f498af
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -5319,6 +5319,24 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        mRecycler.mRecyclerListener = listener;
    }

    class AdapterDataSetObserver extends AdapterView<ListAdapter>.AdapterDataSetObserver {
        @Override
        public void onChanged() {
            super.onChanged();
            if (mFastScroller != null) {
                mFastScroller.onSectionsChanged();
            }
        }

        @Override
        public void onInvalidated() {
            super.onInvalidated();
            if (mFastScroller != null) {
                mFastScroller.onSectionsChanged();
            }
        }
    }

    /**
     * A MultiChoiceModeListener receives events for {@link AbsListView#CHOICE_MODE_MULTIPLE_MODAL}.
     * It acts as the {@link ActionMode.Callback} for the selection mode and also receives
+4 −0
Original line number Diff line number Diff line
@@ -476,6 +476,10 @@ class FastScroller {
        }
    }

    public void onSectionsChanged() {
        mListAdapter = null;
    }

    private void scrollTo(float position) {
        int count = mList.getCount();
        mScrollCompleted = false;