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++) {
Stop searching for code, let great code find you!  Add Codota to your java IDE