@ SuppressWarnings ( "unchecked" ) public boolean scroll ( int direction , boolean allTheWay ) { ArrayList < View > viewList = RobotiumUtils . removeInvisibleViews ( viewFetcher . getAllViews ( true ) ) ; ArrayList < View > filteredViews = RobotiumUtils . filterViewsToSet ( new Class [ ] { ListView . class , ScrollView . class , GridView . class , WebView . class } , viewList ) ; List < View > scrollableSupportPackageViews = viewFetcher . getScrollableSupportPackageViews ( true ) ; for ( View viewToScroll : scrollableSupportPackageViews ) { filteredViews . add ( viewToScroll ) ; } View view = viewFetcher . getFreshestView ( filteredViews ) ; if ( view == null ) { return false ; } if ( view instanceof AbsListView ) { return scrollList ( ( AbsListView ) view , direction , allTheWay ) ; } if ( view instanceof WebView ) { return scrollWebView ( ( WebView ) view , direction , allTheWay ) ; } if ( allTheWay ) { scrollViewAllTheWay ( view , direction ) ; return false ; } else { return scrollView ( view , direction ) ; } }
Scrolls up and down .