Code example for RadioButton

Methods: getText

0
	//what to do when a button is pressed 
	private OnClickListener grayscalelevel_listener = new OnClickListener() {	//do this when threshold button is pressed
		public void onClick(View v) 
		{ 
			RadioButton rb = (RadioButton) v; 
			int label = Integer.parseInt(rb.getText().toString()); 
			threshold = label; 
			initializer(threshold,0); 
		} 
	}; 
	private OnClickListener threshold_listener = new OnClickListener() {	//do this when threshold button is pressed
		public void onClick(View v) 
		{ 
			RadioButton rb = (RadioButton) v; 
			threshold = 2; 
			tag = Integer.parseInt(rb.getTag().toString()); 
			initializer(threshold,tag); 
		} 
	}; 
	 
	private SurfaceHolder dummySurfaceHolder = new SurfaceHolder()