Code example for ViewSwitcher

Methods: setDisplayedChild

0
		this.onRefreshClickListener = onRefreshListener;
	} 
 
	public void showButton() { 
 
		viewSwitcher.setDisplayedChild(BUTTON_VIEW);
	} 
 
	public void showProgressBar() { 
 
		viewSwitcher.setDisplayedChild(PROGRESS_VIEW);
	} 
 
	/**  
	 * Slightly modified code, from Jake Wharton's ABS 
	 */ 
	private void showCheatsheet(Context context, View view) {
 
		final int[] screenPos = new int[2];
		final Rect displayFrame = new Rect();
		view.getLocationOnScreen(screenPos);