Don't invalidate list data during layout.

am: a9d976f39a

Change-Id: I865fda193961bb0e5229cba1034b818572662001
This commit is contained in:
Phil Weaver
2016-11-30 18:00:54 +00:00
committed by android-build-merger

View File

@@ -2168,7 +2168,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
} }
layoutChildren(); layoutChildren();
mInLayout = false;
mOverscrollMax = (b - t) / OVERSCROLL_LIMIT_DIVISOR; mOverscrollMax = (b - t) / OVERSCROLL_LIMIT_DIVISOR;
@@ -2176,6 +2175,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
if (mFastScroll != null) { if (mFastScroll != null) {
mFastScroll.onItemCountChanged(getChildCount(), mItemCount); mFastScroll.onItemCountChanged(getChildCount(), mItemCount);
} }
mInLayout = false;
} }
/** /**
@@ -2705,6 +2705,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
* fail to relayout them properly to accommodate for new bounds. * fail to relayout them properly to accommodate for new bounds.
*/ */
void handleBoundsChange() { void handleBoundsChange() {
if (mInLayout) {
return;
}
final int childCount = getChildCount(); final int childCount = getChildCount();
if (childCount > 0) { if (childCount > 0) {
mDataChanged = true; mDataChanged = true;