public < T extends View > boolean waitForViews ( boolean scrollMethod , Class < ? extends T > ... classes ) { final long endTime = SystemClock . uptimeMillis ( ) + Timeout . getSmallTimeout ( ) ; while ( SystemClock . uptimeMillis ( ) < endTime ) { for ( Class < ? extends T > classToWaitFor : classes ) { if ( waitForView ( classToWaitFor , 0 , false , false ) ) { return true ; } } if ( scrollMethod ) { scroller . scroll ( Scroller . DOWN ) ; } else { scroller . scrollDown ( ) ; } sleeper . sleep ( ) ; } return false ; }
Waits for two views to be shown .