Update fast scroller item count after layoutChildren()
BUG: 12553181
Change-Id: I4ea1b45d08c153b0146868bf57884d6b8dde6245
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 47d42dc..96a2ab5 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -2135,15 +2135,15 @@
mRecycler.markChildrenDirty();
}
- // TODO: Move somewhere sane. This doesn't belong in onLayout().
- if (mFastScroll != null) {
- mFastScroll.onItemCountChanged(childCount, mItemCount);
- }
-
layoutChildren();
mInLayout = false;
mOverscrollMax = (b - t) / OVERSCROLL_LIMIT_DIVISOR;
+
+ // TODO: Move somewhere sane. This doesn't belong in onLayout().
+ if (mFastScroll != null) {
+ mFastScroll.onItemCountChanged(getChildCount(), mItemCount);
+ }
}
/**