public List < View > getScrollableSupportPackageViews ( boolean shouldSleep ) { List < View > viewsToReturn = new ArrayList < View > ( ) ; if ( shouldSleep ) { sleeper . sleep ( ) ; } @ SuppressWarnings ( "unchecked" ) ArrayList < View > views = RobotiumUtils . filterViewsToSet ( new Class [ ] { ViewGroup . class } , getAllViews ( true ) ) ; views = RobotiumUtils . removeInvisibleViews ( views ) ; for ( View view : views ) { if ( isViewType ( view . getClass ( ) , "widget.RecyclerView" ) || isViewType ( view . getClass ( ) , "widget.NestedScrollView" ) ) { viewsToReturn . add ( view ) ; } } return viewsToReturn ; }
Returns a Set of all RecyclerView or empty Set if none is found