diff options
| author | 2016-11-30 18:00:54 +0000 | |
|---|---|---|
| committer | 2016-11-30 18:00:54 +0000 | |
| commit | 84a0d97b852be720a7b6d7ee55b4f6b6885b054c (patch) | |
| tree | ff202fd1c09f450d4b01c007dd938d2f5fa4aadc | |
| parent | 1f5d3014c56c3e29c3d264afed095b3e5b7760b4 (diff) | |
| parent | a9d976f39af3af17ac86ee82335a488d20b0c3d8 (diff) | |
Don't invalidate list data during layout.
am: a9d976f39a
Change-Id: I865fda193961bb0e5229cba1034b818572662001
| -rw-r--r-- | core/java/android/widget/AbsListView.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index f1bfadee5f36..c01348d69f3c 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -2168,7 +2168,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } layoutChildren(); - mInLayout = false; mOverscrollMax = (b - t) / OVERSCROLL_LIMIT_DIVISOR; @@ -2176,6 +2175,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (mFastScroll != null) { 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. */ void handleBoundsChange() { + if (mInLayout) { + return; + } final int childCount = getChildCount(); if (childCount > 0) { mDataChanged = true; |