Android PasswordTransformationMethod - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android PasswordTransformationMethod class.

This code example shows how to use the following methods:
This code example shows how to use the following methods:
 
    if (isChecked) {
      field.setTransformationMethod(null);
    } 
    else { 
      field.setTransformationMethod(new PasswordTransformationMethod());
    } 
 
    field.setSelection(start, end);
  } 
 
  @Override 
  public void onClick(View v) {
    v.setEnabled(false);
 
    if (dbState == State.UNENCRYPTED) {
      try { 
        DatabaseHelper.encrypt(this, passphrase.getText().toString());
      } 
      catch (IOException e) {
6
CodeRank
This code example shows how to use the following methods:
 
			// If check box is unchecked 
		} else { 
 
			// Hide password 
			myPassET.setTransformationMethod(new PasswordTransformationMethod());
		} 
 
		// Flag no longer loading edit text objects 
		loadingFlag = false;
	} 
 
	/** 
	 * Method for validating input before submitting query 
	 *  
	 * @return true if it looks like an email and password length is greater then 1 
	 */ 
	public boolean validateInput() { 
 
		boolean check = true;
3
CodeRank
This code example shows how to use the following methods:
			mPasswordEdit.setTransformationMethod(null);
			// Move to cursor to end of edit text 
			mPasswordEdit.setSelection(mPasswordEdit.getText().length());
		} else { 
			// Else hide password 
			mPasswordEdit.setTransformationMethod(new PasswordTransformationMethod());
			// Move to cursor to end of edit text 
			mPasswordEdit.setSelection(mPasswordEdit.getText().length());
		} 
	} 
	 
	/** 
	 * Show a toast method 
	 * @param message 
	 */ 
	private void toaster(String message){
		Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
	} 
 
	private void showAuthenticatinFailure() { 
3
CodeRank
This code example shows how to use the following methods:
 
    // make the box single line 
    view.setSingleLine(true); 
    // Add a transformation method to hide password text.   This must 
    // be done after the SingleLine command 
    view.setTransformationMethod(new PasswordTransformationMethod()); 
 
    // make sure the done action is Done and not Next.  See comment in Textbox.java 
    view.setImeOptions(EditorInfo.IME_ACTION_DONE); 
 
  } 
} 
5
CodeRank
This code example shows how to use the following methods:
        show_clear.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
		        if (((CheckBox) v).isChecked()) {
		        	loginApiKey.setTransformationMethod(new SingleLineTransformationMethod());
		        } else { 
		        	loginApiKey.setTransformationMethod(new PasswordTransformationMethod());	
		        } 
		        loginApiKey.requestFocus();
		    }	 
		}); 
         
        ((Button) findViewById(R.id.button)).setOnClickListener(this);
         
		loginApiKey.setOnEditorActionListener(this);
        loadLoginPreferences(); 
        restoreState(savedInstanceState);
         
        // use the TabViewActivity when Cloud Files is added 
        // tabViewIntent = new Intent(this, TabViewActivity.class); 
         
3
CodeRank
This code example shows how to use the following methods:
 
	public static void setPasswordType(EditText paramEditText,
			boolean paramBoolean) {
		if (!paramBoolean)
			return; 
		PasswordTransformationMethod localPasswordTransformationMethod = new PasswordTransformationMethod();
		paramEditText
				.setTransformationMethod(localPasswordTransformationMethod);
	} 
 
	public static int getAlarmRecord(Context context) {
		SharedPreferences sh = context.getSharedPreferences("alarm_record",
				Activity.MODE_PRIVATE);
		return sh.getInt("alarmRecord", -1);
	} 
 
	public static void saveAlarmRecord(Context context) {
		SharedPreferences sh = context.getSharedPreferences("alarm_record",
				Activity.MODE_PRIVATE);
		int i = sh.getInt("alarmRecord", -1);
4
CodeRank
This code example shows how to use the following methods:
This code example shows how to use the following methods:
		textBox.addTextChangedListener(listener);
	} 
 
	public void setPassword(boolean flag) {
		if (flag)
			textBox.setTransformationMethod(new PasswordTransformationMethod());
	} 
 
	public void setPrivateImeOptions(String option) {
		textBox.setPrivateImeOptions(option);
	} 
 
	public void setImeOptions(int option) {
		textBox.setImeOptions(option);
	} 
 
	public void setText(CharSequence cs) {
		textBox.setText(cs);
	} 
 
4
CodeRank
This code example shows how to use the following methods:

Related Android PasswordTransformationMethod Questions & Answers:

See Code Examples for Android PasswordTransformationMethod Methods: