TextView setTransformationMethod - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TextView setTransformationMethod method.

This code example shows how to use the following methods:setSelection, getSelectionEnd, getSelectionStart, setTransformationMethod
    toggleShowPassphrase(passphrase, isChecked);
    toggleShowPassphrase(confirm, isChecked);
  } 
 
  private void toggleShowPassphrase(EditText field, boolean isChecked) {
    int start=field.getSelectionStart();
    int end=field.getSelectionEnd();
 
    if (isChecked) {
      field.setTransformationMethod(null);
    } 
    else { 
      field.setTransformationMethod(new PasswordTransformationMethod());
    } 
 
    field.setSelection(start, end);
  } 
 
  @Override 
  public void onClick(View v) {
    v.setEnabled(false);
8
CodeRank
This code example shows how to use the following methods:setSelection, getSelectionEnd, getSelectionStart, setTransformationMethod
This code example shows how to use the following methods:setKeyListener, setSingleLine, setTransformationMethod
        super.onBindDialogView(view);
         
        final EditText editText = (EditText) view.findViewById(android.R.id.edit);
         
        if (editText != null) {
            editText.setSingleLine(true);
            editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
            editText.setKeyListener(DigitsKeyListener.getInstance());
        } 
    } 
 
    public boolean isDialogOpen() { 
        return mDialogOpen;
    } 
     
    @Override 
    protected void onDialogClosed(boolean positiveResult) {
        super.onDialogClosed(positiveResult);
        mDialogOpen = false;
        if (mPinListener != null) {
6
CodeRank
This code example shows how to use the following methods:setTransformationMethod
This code example shows how to use the following methods:setTransformationMethod
This code example shows how to use the following methods:setTransformationMethod
		editText.setVisibility(VISIBLE);
	} 
	 
	public void setPassword() 
	{ 
		editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
	} 
 
} 
4
CodeRank

Related TextView setTransformationMethod Questions & Answers:

setTransformationMethod Method Overview
Sets the transformation that is applied to the text that this TextView is displaying.
See Code Examples for other Android TextView Methods: