diff options
Diffstat (limited to 'core/java/android/widget/FastScroller.java')
-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 7ad5d6c..51506e8 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) { |