Code example for ListView

Methods: scrollToBottomgetHeightgetChildAtgetChildCountgetListPaddingBottomgetAdapter, getSelectedItemPosition

0
                mListView.getChildCount() <= originalCount + 1);
    } 
     
    @MediumTest 
    public void testPushUp() { 
        TouchUtils.scrollToBottom(this, mListView);
 
        // Nothing should be selected 
        assertEquals("Selection still available after touch", -1, 
                mListView.getSelectedItemPosition());
 
        View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
 
        assertEquals("List is not scrolled to the bottom", mListView.getAdapter().getCount() - 1,
                lastChild.getId());
 
        assertEquals("Last item is not touching the bottom edge", 
                mListView.getHeight() - mListView.getListPaddingBottom(), lastChild.getBottom());
    } 
     
    @MediumTest 
    public void testNoScroll() { 
        View firstChild = mListView.getChildAt(0);
Connect your IDE to all the code out there  Get Codota for Java