Code example for CheckBoxPreference

Methods: setSummary, isChecked

0
		public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, 
				String key) { 
			if(key.equals(PREF_CALL_RANGE)) { 
				loadPreference(sharedPreferences, key); 
			} else if (key.equals(PREF_VIBE_MODE)) { 
				if(vibemodePref.isChecked()) { 
					vibemodePref.setSummary("true"); 
				} else { 
					vibemodePref.setSummary("false"); 
				} 
			} else if (key.equals(PREF_SETTING_SOUND)) { 
				soundselectPref.setSummary(prefs.getString(PREF_TITLE_KEY, "0")); 
			} else if (key.equals(PREF_NOW_TWEET)) { 
				nowTweetPref.setSummary(prefs.getString(PREF_NOW_TWEET, "イマココ!!")); 
			} else if (key.equals(PREF_WILL_TWEET)) { 
				willTweetPref.setSummary(prefs.getString(PREF_WILL_TWEET, "ココイク!!")); 
			} 
		} 
	}; 
 
	private void loadPreference(SharedPreferences sharedPreferences, String key) {