如何更改密码的EditText提起字符来代替星点Android的? [英] how to change edittext password filed characters to star instead of dots android?
问题描述
我创建的用户名登录一次应用程序和密码fields.here我的问题是,当我插入的EditText点数申请bydefault其显示密码文本。我想表明它在恒星symbol.Is可以在android系统?
如果可能的话,请帮助我。
I created one login application with username and password fields.here my problem is when i insert the password text in edittext filed bydefault its shows in dots. I want to show it in stars symbol.Is it possible in android? If possible please help me.
问候,
马杜。
regards, Madhu.
推荐答案
您使用<一个href=\"http://developer.android.com/reference/android/widget/TextView.html#setTransformationMethod%28android.text.method.TransformationMethod%29\"相对=nofollow> setTransformationMethod()
以及类似的的 PasswordTransformationMethod
即。你让你自己的<一个href=\"http://www.java2s.com/Open-Source/Android/android-core/platform-frameworks-base/android/text/method/PasswordTransformationMethod.java.htm\"相对=nofollow> PasswordTransformationMethod ,在那里,而不是DOT:
i.e. you make your own PasswordTransformationMethod, where instead of the DOT :
private static char DOT = '\u2022';
您使用任何你喜欢的。 Asterisk是 \\ u002A
You use whatever you fancy. Asterisk is \u002A
这篇关于如何更改密码的EditText提起字符来代替星点Android的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!