Code example for CheckBoxPreference

Methods: setOnPreferenceChangeListener

0
			SystemService.start(TETHER_OFF);
		} 
	} 
	 
	public void pause() { 
		mCheckBoxPref.setOnPreferenceChangeListener(null);
	} 
	 
	public void resume() { 
		mCheckBoxPref.setOnPreferenceChangeListener(this);
		final boolean isEnabled = SystemProperties.getBoolean(TETHER_PROP, false);
		mCheckBoxPref.setChecked(isEnabled);
		mCheckBoxPref.setSummary(isEnabled ? R.string.internet_tethering_summary_on : R.string.internet_tethering_summary_off);
	} 
}