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

* commit 'f4071065b88d5b4acbe8ef102275244636ba9959':
  Fix bug with transientState for listviews without stable IDs
This commit is contained in:
Chet Haase
2013-03-19 13:10:48 +00:00
committed by Android Git Automerger

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>();
}