如何将EditTextPreference用作屏蔽的密码文本字段? [英] How to use EditTextPreference as a masked Password text field?

查看:256
本文介绍了如何将EditTextPreference用作屏蔽的密码文本字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的问题:
我有一个EditTextPreference对话框,我想使用该对话框来获取用户的密码,并且希望将其屏蔽.

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.

我该怎么办?

推荐答案

以下是使用xml的简短示例:

Here is a short example using xml:

<EditTextPreference
    android:key="@string/key"
    android:title="@string/title"
    android:summary="@string/summary"   
    android:inputType="textPassword" />

或者您可以使用numberPassword代替textPassword.

这篇关于如何将EditTextPreference用作屏蔽的密码文本字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆