code: public <T extends View> boolean waitForView(final Class<T> viewClass, final int index, boolean sleep, boolean scroll){
  		Set<T> uniqueViews = new HashSet<T>();
  		boolean foundMatchingView;
  
  		while(true){
  
  			if(sleep)
  				sleeper.sleep();
  
  			foundMatchingView = searcher.searchFor(uniqueViews, viewClass, index);
  
  			if(foundMatchingView)
  				return true;
  
  			if(scroll && !scroller.scrollDown())
  				return false;
  
  			if(!scroll)
  				return false;
  		}
  	}
docs: Waits for a view to be shown.
  
  @param viewClass the {@code View} class to wait for
  @param index the index of the view that is expected to be shown
  @param sleep true if should sleep
  @param scroll {@code true} if scrolling should be performed
  @return {@code true} if view is shown and {@code false} if it is not shown before the timeout