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

This commit is contained in:
Adam Powell
2011-01-18 20:44:44 -08:00
committed by Android (Google) Code Review
2 changed files with 22 additions and 0 deletions

View File

@@ -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

View File

@@ -476,6 +476,10 @@ class FastScroller {
}
}
public void onSectionsChanged() {
mListAdapter = null;
}
private void scrollTo(float position) {
int count = mList.getCount();
mScrollCompleted = false;