How to use EditTextPreference as a masked Password text field?

前端 未结 5 1879
感动是毒
感动是毒 2021-02-04 23:51

I have a very simple question:
I have a EditTextPreference dialog which I want to use for getting the user\'s password and I want it to be masked.

How c

5条回答
  •  南笙
    南笙 (楼主)
    2021-02-05 00:22

    If you want that the password mask persist also after device rotation is suffice to add the following imeOption:

    in the edit text layout android:imeOptions="flagNoExtractUi"

    or programmatically yourEditText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);

提交回复
热议问题