如何让Android的PIN号码密码键盘? [英] How to get a pin number password keyboard in android?

查看:263
本文介绍了如何让Android的PIN号码密码键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个PIN码的EditText A数字键盘。我试图用

I need a number keyboard on a PIN EditText. I tried using

android:inputType="number|textPassword"

这带来了数字键盘,但字符不是密码字符。

This brings up the number keypad, but the characters are not password chars.

如何获得一个数字键盘,显示在的EditText 查看密码字符?

How to get a number keypad that shows password chars in EditText view?

该应用程序在2.2及以上运行。

The app runs on 2.2 and above.

推荐答案

您应该看看这里:
<一href=\"http://stackoverflow.com/questions/2017674/edittext-set-for-password-with-phone-number-input-android\">Edittext与电话号码输入密码设置? (机器人)

据指出,
的android:密码是德precated,但是是唯一的方法,因为的android:inputType下=手机| textPassword被忽略......

It states that android:password is deprecated, but is the only way because android:inputType="phone|textPassword" is ignored ...

<EditText
    android:id="@+id/EditText01"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:password="true"
    android:inputType="phone" 
/>

这篇关于如何让Android的PIN号码密码键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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