am d63d3358: Merge "Fix bug 3362258 - Fastscroll is out of sync with the list" into honeycomb
* commit 'd63d33581051fdffd16789551852368d21b89fe1': Fix bug 3362258 - Fastscroll is out of sync with the list
This commit is contained in:
@@ -5319,6 +5319,24 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
mRecycler.mRecyclerListener = listener;
|
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}.
|
* 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
|
* 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) {
|
private void scrollTo(float position) {
|
||||||
int count = mList.getCount();
|
int count = mList.getCount();
|
||||||
mScrollCompleted = false;
|
mScrollCompleted = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user