Code example for CheckBox

Methods: setText, setChecked, setOnCheckedChangeListener

0
			} 
		}; 
		 
		//build our checkbox, since chances are _checkbox is an empty CheckBox hull 
		//first, set our listener to the listener we just created 
		this.checkbox.setOnCheckedChangeListener(listener);
		//set the checkbox to reflect the current state of the state, i.e checked for enabled, 
		//unchecked for disabled 
		this.checkbox.setChecked(this.stateEnabled);
		//finally, set the text to equal the value of this state, plus Mhz 
		//for example, if this is state 1400, we will set the text to "1400 Mhz" 
		this.checkbox.setText(String.valueOf(this.value) + " Mhz");
		 
		//just before we finish, lets format our tis values to fill out hours, minutes, seconds 
		this.formatTIS();
	} 
}