Code example for CheckBoxPreference

Methods: isChecked

0
			Preference pref) {
		if (pref == mAlsoDisableNP) {
			return true; 
		} else if (pref == mOk) {
			// save settings when clicking OK 
			settings.setWidgetAlsoDisableNP(mAlsoDisableNP.isChecked());
 
			// Push widget update to surface with newly set prefix 
			AppWidgetManager appWidgetManager = AppWidgetManager
					.getInstance(this);
			OnOffAppWidgetProvider.updateAppWidget(this, appWidgetManager,
					mAppWidgetId);
 
			// Make sure we pass back the original appWidgetId 
			Intent resultValue = new Intent();
			resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
					mAppWidgetId);
			setResult(RESULT_OK, resultValue);
			finish();
		} 
Stop searching for code, let great code find you!  Add Codota to your java IDE