Code example for CountDownTimer

Methods: cancel, onFinish

0
					}; 
					timer.start();
				} 
				else { 
					((CheckBoxPreference)preference).setChecked(false);
					timer.cancel();
					timer.onFinish();
				} 
				return false; 
			} 
		}); 
	} 
 
	@SuppressWarnings("deprecation") 
	private void refreshDeviceName() { 
		((EditTextPreference) findPreference("p_device_name")).setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
			@Override 
			public boolean onPreferenceChange(Preference preference, Object newValue) {
				editor = preferences.edit();
				editor.putString("p_device_name", newValue.toString());
Contextual code suggestions in your IDE  Get Codota for Java