Merge "Fix bug 3362258 - Fastscroll is out of sync with the list" into honeycomb
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -476,6 +476,10 @@ class FastScroller {
|
||||
}
|
||||
}
|
||||
|
||||
public void onSectionsChanged() {
|
||||
mListAdapter = null;
|
||||
}
|
||||
|
||||
private void scrollTo(float position) {
|
||||
int count = mList.getCount();
|
||||
mScrollCompleted = false;
|
||||
|
||||
Reference in New Issue
Block a user