开发者

Android - Disable Password hint

开发者 https://www.devze.com 2023-02-13 21:42 出处:网络
How to disable password hin开发者_如何转开发t while using softkeyboard in Android applications???Mention the android:inputType attribute inside your EditText:

How to disable password hin开发者_如何转开发t while using softkeyboard in Android applications???


Mention the android:inputType attribute inside your EditText:

android:inputType="textFilter|textMultiLine|textNoSuggestions"


Here is the solution I have come up with.

  1. Create a new class that extends TextWatcher
  2. @Override public void beforeTextChanged() to capture the new CharSequence
  3. Store the new CharSequence privately so you know what text is in there.
  4. Replace the text in the EditText with X number of password bullets (•)
  5. Add the watcher to your EditText with pwEditText.addTextChangedListener(new PassWatcher());

Hope that helps

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号