File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
autoimageslider/src/main/java/com/smarteist/autoimageslider Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -380,10 +380,18 @@ public void setSliderTransformAnimation(SliderAnimations animation) {
380380
381381 @ Override
382382 public boolean onTouch (View v , MotionEvent event ) {
383- if (event .getAction () == MotionEvent .ACTION_MOVE ) {
384- mPausedSliding = true ;
385- } else if (event .getAction () == MotionEvent .ACTION_UP ) {
386- mPausedSliding = false ;
383+ if (isAutoCycle ()) {
384+ if (event .getAction () == MotionEvent .ACTION_MOVE ) {
385+ mPausedSliding = true ;
386+ } else if (event .getAction () == MotionEvent .ACTION_UP ) {
387+ // resume after ~2 seconds debounce.
388+ mHandler .postDelayed (new Runnable () {
389+ @ Override
390+ public void run () {
391+ mPausedSliding = false ;
392+ }
393+ }, 2000 );
394+ }
387395 }
388396 return false ;
389397 }
You can’t perform that action at this time.
0 commit comments