Code example for EditTextPreference

Methods: setEnabledsetSummary

0
			super.onCreate(savedInstanceState);
			addPreferencesFromResource(SettingsPreferences.prefs);
 
			EditTextPreference device_id = (EditTextPreference) this.findPreference("device_id");
			// device_id.setSummary("Registered ID is:" + (user_id + 1000)); 
			device_id.setSummary("Registered ID is:" + "****");
			if (user_id != -1)
				Global.setRegisteredId(user_id);
			else { 
			} 
 
			device_id.setEnabled(false);
			/* 
			 * server_chooser = (ListPreference) 
			 * this.findPreference("list_servers"); 
			 * server_chooser.setOnPreferenceChangeListener(new 
			 * OnPreferenceChangeListener() { 
			 *  
			 * @Override public boolean onPreferenceChange(Preference 
			 * preference, Object newValue) { 
Contextual code suggestions in your IDE  Get Codota for Java