diff options
| author | 2011-08-25 15:26:36 -0700 | |
|---|---|---|
| committer | 2011-08-25 15:26:36 -0700 | |
| commit | ba5fe92361f717899e4b1e37a79f9f0547624487 (patch) | |
| tree | 3d56bc52eb40f75bae9b74dd0c4497462522fc6e | |
| parent | 412be650371f63da229eb5ba4045e8e35bd59afb (diff) | |
| parent | 35948b7ed502d3f126acc8f2d61e099fa5deb0c7 (diff) | |
Merge "Fix bug 5199326 - ListView's fast scroller is out of sync with contents"
| -rw-r--r-- | core/java/android/widget/FastScroller.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java index 7ad5d6c94853..51506e8c6f7a 100644 --- a/core/java/android/widget/FastScroller.java +++ b/core/java/android/widget/FastScroller.java @@ -368,8 +368,10 @@ class FastScroller { } else if (mState == STATE_EXIT) { if (alpha == 0) { // Done with exit setState(STATE_NONE); + } else if (mTrackDrawable != null) { + mList.invalidate(viewWidth - mThumbW, 0, viewWidth, mList.getHeight()); } else { - mList.invalidate(viewWidth - mThumbW, y, viewWidth, y + mThumbH); + mList.invalidate(viewWidth - mThumbW, y, viewWidth, y + mThumbH); } } } @@ -597,7 +599,7 @@ class FastScroller { private int getThumbPositionForListPosition(int firstVisibleItem, int visibleItemCount, int totalItemCount) { - if (mSectionIndexer == null) { + if (mSectionIndexer == null || mListAdapter == null) { getSectionsFromIndexer(); } if (mSectionIndexer == null || !mMatchDragPosition) { |