From 3cf3c0143b0c5e2e767fe8d89dcf79ea2d19a186 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 23 Oct 2015 15:46:10 -0700 Subject: #578 Fix scroller getting stuck at top and bot after jittery fix --- app/src/main/java/github/daneren2005/dsub/view/FastScroller.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/github/daneren2005/dsub/view/FastScroller.java b/app/src/main/java/github/daneren2005/dsub/view/FastScroller.java index 9a108804..e36667d8 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/FastScroller.java +++ b/app/src/main/java/github/daneren2005/dsub/view/FastScroller.java @@ -104,7 +104,9 @@ public class FastScroller extends LinearLayout { handle.setSelected(true); case MotionEvent.ACTION_MOVE: final float y = event.getY(); - // setBubbleAndHandlePosition(y); + if(handle.getY() <= 0 || (handle.getY() + handle.getHeight()) >= height - TRACK_SNAP_RANGE) { + setBubbleAndHandlePosition(y); + } setRecyclerViewPosition(y); return true; case MotionEvent.ACTION_UP: -- cgit v1.2.3