Code example for PasswordTransformationMethod

            // This informs the keyboard not to show up the autocomplete. 
            // Ensure that you have set this input type, otherwise users 
            // may complain that your application is saving their passwords. 
            // This gives us the masking that you see in your password fields 
            field.setTransformationMethod(new PasswordTransformationMethod());
        // We still return false so that the system will handle everything else. 
        // We just needed to ensure that if this preference is the password pref 
        // that it's properly protected from prying eyes. 
        return false; 
    protected void onPause() { 
	public boolean onPreferenceChange(Preference preference, Object newValue) {
		String key = preference.getKey();
		if (key.equals("username") || key.equals("password")) {
			// If the changed preference is the username or password, set the result so that when we exit,