@Test public void testNoScrollWhenOutOfScrollZone() { mScroller.scroll(new Point(0, VIEW_HEIGHT / 2)); mHost.run(); mHost.assertNotScrolled(); }
@Override public void scroll(@NonNull Point location) { mLastLocation = location; if (mOrigin == null) { mOrigin = location; if (VERBOSE) Log.v(TAG, "Origin @ " + mOrigin); } if (VERBOSE) Log.v(TAG, "Current location @ " + mLastLocation); mHost.runAtNextFrame(mRunner); }
ViewAutoScroller extends AutoScroller { @Override public void scroll(@NonNull Point location) { mLastLocation = location; if (mOrigin == null) { mOrigin = location; if (VERBOSE) Log.v(TAG, "Origin @ " + mOrigin); } if (VERBOSE) Log.v(TAG, "Current location @ " + mLastLocation); mHost.runAtNextFrame(mRunner); } }
ViewAutoScroller extends AutoScroller { @Override public void scroll(@NonNull Point location) { mLastLocation = location; if (mOrigin == null) { mOrigin = location; if (VERBOSE) Log.v(TAG, "Origin @ " + mOrigin); } if (VERBOSE) Log.v(TAG, "Current location @ " + mLastLocation); mHost.runAtNextFrame(mRunner); } ViewAutoScroller(@NonNull ScrollHost scrollHost); @VisibleForTesting  ViewAutoScroller(@NonNull ScrollHost scrollHost, float scrollThresholdRatio); }
ViewAutoScroller extends AutoScroller { @Override public void scroll(@NonNull Point location) { mLastLocation = location; if (mOrigin == null) { mOrigin = location; if (VERBOSE) Log.v(TAG, "Origin @ " + mOrigin); } if (VERBOSE) Log.v(TAG, "Current location @ " + mLastLocation); mHost.runAtNextFrame(mRunner); } ViewAutoScroller(@NonNull ScrollHost scrollHost); @VisibleForTesting  ViewAutoScroller(@NonNull ScrollHost scrollHost, float scrollThresholdRatio); @Override void reset(); @Override void scroll(@NonNull Point location); }
ViewAutoScroller extends AutoScroller { @Override public void scroll(@NonNull Point location) { mLastLocation = location; if (mOrigin == null) { mOrigin = location; if (VERBOSE) Log.v(TAG, "Origin @ " + mOrigin); } if (VERBOSE) Log.v(TAG, "Current location @ " + mLastLocation); mHost.runAtNextFrame(mRunner); } ViewAutoScroller(@NonNull ScrollHost scrollHost); @VisibleForTesting  ViewAutoScroller(@NonNull ScrollHost scrollHost, float scrollThresholdRatio); @Override void reset(); @Override void scroll(@NonNull Point location);  }