Code example for Button

Methods: setEnabled, setOnClickListener

0
		container = (WideLinearLayout) findViewById(R.id.wizard_container);
	} 
 
	private static void setButtonState(Button b, boolean state,
			View.OnClickListener e) {
		b.setOnClickListener(e);
		b.setEnabled(state);
	} 
 
	public void enableNextButton(Button b) {
		b.setOnClickListener(nextPageButtonListener);
		b.setEnabled(true);
	} 
 
	// starting from given page, disable all next buttons, and disable 
	// swiping to the right. 
	public void disableAllNextActions(int page) {
		// first disable next buttons 
		if (container != null)
			for (int i = page; i < container.getChildCount(); i++) {
				// get the pageview container