diff options
author | NoraBora <noranbora@gmail.com> | 2010-10-12 06:59:55 -0700 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2010-10-21 00:09:48 -0400 |
commit | d6f8baf6f2c26a5c8458df503e454fe5351a5280 (patch) | |
tree | e4e0142eeeeb5a57306e02751b73e529d596865e /core | |
parent | eebdd4c2150f6998810c984d53a4655fb136641c (diff) | |
download | frameworks_base-d6f8baf6f2c26a5c8458df503e454fe5351a5280.zip frameworks_base-d6f8baf6f2c26a5c8458df503e454fe5351a5280.tar.gz frameworks_base-d6f8baf6f2c26a5c8458df503e454fe5351a5280.tar.bz2 |
Fix FastScroller overlay position bug
after setFastScrollEnabled(false)-->setFastScrollEnabled(true)
the overlay shows up at the top-left instead of center
Change-Id: Idd5d4640398def8391f99962bd1838a3bde98157
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/FastScroller.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java index 54c4b36..aa68a74 100644 --- a/core/java/android/widget/FastScroller.java +++ b/core/java/android/widget/FastScroller.java @@ -154,6 +154,11 @@ class FastScroller { int textColorNormal = textColor.getDefaultColor(); mPaint.setColor(textColorNormal); mPaint.setStyle(Paint.Style.FILL_AND_STROKE); + + // to show mOverlayDrawable properly + if (mList.getWidth() > 0 && mList.getHeight() > 0) { + onSizeChanged(mList.getWidth(), mList.getHeight(), 0, 0); + } mState = STATE_NONE; } |