Password hint font in Android -


When an edit text is in password mode, it seems that the signal is shown in a different font (courier?). How can I avoid this? I have to reveal this signal in a single font, when EditText is not in password mode.

My current XML:

  & lt; EditText android: hint = "@ string / edt_password_hint" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: password = "true" android: singleLine = "true" /> Changing typeface in Xml did not work on the hint text for me. I got two different solutions, one of which is better behavior for me:  

1) Remove from your xml file and instead, remove android: inputType = "textPassword" In:

  Edit Text Password = (Edit Text) Find VVBIID (RaidPasswordText); Password.setTransformationMethod (New Password Transformation Method);  

With this approach, the hint font looks good, but as you are typing into that editing field, before it turns into a password dot, you can use plain text for each letter Will not appear in. Apart from this, when inputs in fullscreen, dots will not be visible, but passive in clear text.

2) In your xml, leave android: inputType = "textPassword" in Java, set the typeface and password method:

  EditText password = (EditText) findViewById (R.id.register_password_text); Password.setTypeface (Typeface.DEFAULT); Password.setTransformationMethod (New Password Transformation Method);  

This approach gave me a hint and gave me the behavior that I want with password dots.

Hope that helps!


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -