Code example for OverScroller

    public void testWhenContentSizeMatchesView() { 
        TestScrollOffsetManagerDelegate delegate = new TestScrollOffsetManagerDelegate();
        OverScroller scroller = new OverScroller(getInstrumentation().getContext());
        AwScrollOffsetManager offsetManager = new AwScrollOffsetManager(delegate, scroller);
        final int width = 132;
        final int height = 212;
        final int scrollX = 11;
        final int scrollY = 13;
        offsetManager.setContentSize(width, height);
        offsetManager.setContainerViewSize(width, height);
        assertEquals(width, offsetManager.computeHorizontalScrollRange());
        assertEquals(height, offsetManager.computeVerticalScrollRange());
        // Since the view size and contents size are equal no scrolling should be possible. 
Connect your IDE to all the code out there  Get Codota for Java