public static < T extends View > ArrayList < T > removeInvisibleViews ( Iterable < T > viewList ) { ArrayList < T > tmpViewList = new ArrayList < T > ( ) ; for ( T view : viewList ) { if ( view != null && view . isShown ( ) ) { tmpViewList . add ( view ) ; } } return tmpViewList ; }
Removes invisible Views .