Merge "Fix bug with transientState for listviews without stable IDs" into jb-mr2-dev

This commit is contained in:
Chet Haase
2013-03-19 13:06:55 +00:00
committed by Android (Google) Code Review

View File

@@ -6366,7 +6366,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
mTransientStateViewsById = new LongSparseArray<View>();
}
mTransientStateViewsById.put(lp.itemId, scrap);
} else {
} else if (!mDataChanged) {
// avoid putting views on transient state list during a data change;
// the layout positions may be out of sync with the adapter positions
if (mTransientStateViews == null) {
mTransientStateViews = new SparseArray<View>();
}