Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa4f5c95 authored by Adam Powell's avatar Adam Powell
Browse files

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
parent 1a4c4334
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -335,6 +335,7 @@ public abstract class AbsSeekBar extends ProgressBar {
                    mTouchDownX = event.getX();
                } else {
                    setPressed(true);
                    invalidate(mThumb.getBounds()); // This may be within the padding region
                    onStartTrackingTouch();
                    trackTouchEvent(event);
                    attemptClaimDrag();
@@ -348,6 +349,7 @@ public abstract class AbsSeekBar extends ProgressBar {
                    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();