Code example for Button

Methods: isFocused

        assertTrue("top button should be off screen",
                getBottomWithinScrollView(mTopButton) < mScrollView.getScrollY());
        assertFalse("top button should have lost focus",
        assertTrue("scroll view should be focused", mScrollView.isFocused());
    public void testScrollDownToBottomButton() throws Exception { 
        final int screenBottom = mScrollView.getScrollY() + mScrollView.getHeight();
        final int numDownsToButtonButton =
                ((getBottomWithinScrollView(mBottomButton) - screenBottom)) / mScrollView.getMaxScrollAmount() + 1;
        for (int i = 0; i < numDownsToButtonButton; i++) {
Connect your IDE to all the code out there  Get Codota for Java