Code example for ViewSwitcher

Methods: setDisplayedChild

0
		refreshButton.setOnClickListener(new OnClickListener() {
			 
			@Override 
			public void onClick(View v) {
				 
				viewSwitcher.setDisplayedChild(PROGRESS_VIEW);
				 
				if (onRefreshClickListener != null) {
					onRefreshClickListener.onRefresh();
				} 
			} 
		}); 
		refreshButton.setOnLongClickListener(new OnLongClickListener() {
			 
			@Override 
			public boolean onLongClick(View view) {
				showCheatsheet(context, view);
				return true; 
			} 
		}); 
Stop searching for code, let great code find you!  Add Codota to your java IDE