Code example for View

Methods: dragViewToYgetTop

0
     
    @LargeTest 
    public void testLongScroll() { 
        View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
         
        int lastTop = lastChild.getTop();
         
        int distance = TouchUtils.dragViewToY(this, lastChild, 
                Gravity.TOP | Gravity.LEFT, mListView.getTop());
         
        assertEquals("View scrolled to wrong position", 
                lastTop - (distance - ViewConfiguration.getTouchSlop() - 1), lastChild.getTop());
    }  
 
} 
Contextual code suggestions in your IDE  Get Codota for Java