Code example for ScrollView

Methods: getHeight, getVerticalFadingEdgeLength

0
    } 
 
     
    @MediumTest 
    public void testPreconditions() { 
        assertNotNull(mScrollView);
        assertNotNull(mClickToScrollFromAbove);
        assertNotNull(mClickToScrollToUpperBlob);
        assertNotNull(mTopBlob);
        assertNotNull(mChildToScrollTo);
        assertNotNull(mBottomBlob);
        assertNotNull(mClickToScrollToBlobLowerBlob);
        assertNotNull(mClickToScrollFromBelow);
 
        assertTrue("top blob needs to be taller than the screen for many of the "
                + "tests below to work.", 
                mTopBlob.getHeight() > mScrollView.getHeight());
 
        assertTrue("bottom blob needs to be taller than the screen for many of the "
                + "tests below to work.", 
                mBottomBlob.getHeight() > mScrollView.getHeight());
 
        assertTrue("top blob needs to be lower than the fading edge region",
                mTopBlob.getTop() > mScrollView.getVerticalFadingEdgeLength());
    } 
 
    @MediumTest 
    public void testScrollToOffScreenRectangleFromTop() { 
        // view is off screen 
Experience pair programming with AI  Get Codota for Java