Code example for EditTextPreference

Methods: getEditText, setDialogTitle

0
	    public void AddEditText2(String Key, String Title, String Summary, String DefaultValue, final int InputType, final boolean Password, final boolean SelectAllOnFocus, String Dependency)
	    { 
	      this.childs.add(new B4APreference(Key, Title, Summary, DefaultValue, Dependency)
	      { 
	        Preference createPreference(PreferenceActivity c) {
	          EditTextPreference e = new EditTextPreference(c);
	          e.setDialogTitle(this.title);
	          EditText et = e.getEditText();
	          et.setInputType(InputType);
	          et.setSelectAllOnFocus(SelectAllOnFocus);
	          if (Password) et.setTransformationMethod(new PasswordTransformationMethod());
	          handleDefaults(e);
	          return e;
	        } 
	      }); 
	    } 
 
		 
		/** 
		 * Adds a preference entry which allows the user to enter a password. Be aware that the password is saved uncrypted in the preferences file! 
		 *Key - The preference key associated with the value.