I\'m going through a weird problem.
I have created CustomEdittext class for setting Typeface
for whole application and it works success
It seems that the font that you have included does not contain a character for the symbol used by default for password transformation. You have two options:
Use a different font
Change the mask character to something that the font does contain.
Because I speculate you're not a quitter, here's some code that will change the mask character from a dot ( • ) to an asterisk ( * ).
First you must make your own PasswordTransformationMethod to override the default:
public class AsteriskPasswordTransformationMethod extends PasswordTransformationMethod {
@Override
public CharSequence getTransformation(CharSequence source, View view) {
return new PasswordCharSequence(source);
}
private class PasswordCharSequence implements CharSequence {
private CharSequence mSource;
public PasswordCharSequence(CharSequence source) {
mSource = source; // Store char sequence
}
public char charAt(int index) {
// This is where we make it an asterisk. If you wish to use
// something else then change what this returns
return '*';
}
public int length() {
return mSource.length(); // Return default
}
public CharSequence subSequence(int start, int end) {
return mSource.subSequence(start, end); // Return default
}
}
};
Finally you set your new transformation method to the EditText
you wish to mask.
edt_password = (EditText)findViewById(R.id.edt_password);
edt_password.setTransformationMethod(new AsteriskPasswordTransformationMethod());
I used information from this question.