Fix bug 5434403 - invalidation problem with seek bars at edges
Explicitly invalidate the seek bar thumb area when we change drawable
states for touch down. This prevents the thumb from only being
half-invalidated at the edges since it extends into the view's padding
region.
Change-Id: Icc4e608aca044b2d05f3a9378eced839c03947e6
diff --git a/core/java/android/widget/AbsSeekBar.java b/core/java/android/widget/AbsSeekBar.java
index df8eb05..475b8ee 100644
--- a/core/java/android/widget/AbsSeekBar.java
+++ b/core/java/android/widget/AbsSeekBar.java
@@ -335,6 +335,7 @@
mTouchDownX = event.getX();
} else {
setPressed(true);
+ invalidate(mThumb.getBounds()); // This may be within the padding region
onStartTrackingTouch();
trackTouchEvent(event);
attemptClaimDrag();
@@ -348,6 +349,7 @@
final float x = event.getX();
if (Math.abs(x - mTouchDownX) > mScaledTouchSlop) {
setPressed(true);
+ invalidate(mThumb.getBounds()); // This may be within the padding region
onStartTrackingTouch();
trackTouchEvent(event);
attemptClaimDrag();