Code example for CheckBox

Methods: setChecked, setOnClickListener

0
		// TextView 
		mTitle.setText(mLabeler.getLabel(mCurrentObject));
 
		// CheckBox 
		if (mPrefs.getBoolean(mTitle.getText().toString(), false)) {
			mPrefBox.setChecked(true);
		} 
 
		// CheckBox Listener 
		mPrefBox.setOnClickListener(new OnClickListener() {
 
			/** 
			 * Defines what has to be performed when the <code>CheckBox</code> 
			 * is clicked. 
			 */ 
			@Override 
			public void onClick(View v) {
				CheckBox b = (CheckBox) v;
 
				if (mOnCheckBoxClickListener != null) {