Skip to content

Commit f54f0cd

Browse files
committed
Fix onStartTrackingTouch() listener call
1 parent 7386ab5 commit f54f0cd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

library/src/main/java/org/adw/library/widgets/discreteseekbar/DiscreteSeekBar.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,10 +655,6 @@ private boolean startDragging(MotionEvent ev, boolean ignoreTrackIfInScrollConta
655655
bounds.inset(-mAddedTouchBounds, -mAddedTouchBounds);
656656
mIsDragging = (bounds.contains((int) ev.getX(), (int) ev.getY()));
657657
if (!mIsDragging && mAllowTrackClick && !ignoreTrackIfInScrollContainer) {
658-
if (mPublicChangeListener != null) {
659-
mPublicChangeListener.onStartTrackingTouch(this);
660-
}
661-
662658
//If the user clicked outside the thumb, we compute the current position
663659
//and force an immediate drag to it.
664660
mIsDragging = true;
@@ -673,6 +669,9 @@ private boolean startDragging(MotionEvent ev, boolean ignoreTrackIfInScrollConta
673669
attemptClaimDrag();
674670
setHotspot(ev.getX(), ev.getY());
675671
mDragOffset = (int) (ev.getX() - bounds.left - mAddedTouchBounds);
672+
if (mPublicChangeListener != null) {
673+
mPublicChangeListener.onStartTrackingTouch(this);
674+
}
676675
}
677676
return mIsDragging;
678677
}

0 commit comments

Comments
 (0)