如何限制psented给用户拉丁Android键盘$ P $? [英] How do I restrict the Android keyboard presented to a user to Latin?

查看:96
本文介绍了如何限制psented给用户拉丁Android键盘$ P $?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有要求用户输入十进制32和126之间的ASCII密码,这意味着,只有拉丁字符和数字键盘的有效期为编辑应用程序。然而,当我启动我的EditText,西里尔键盘psented用户$ P $。

I have an application that requires that the user enter an ASCII password between dec 32 and 126. This means that only a latin character and number keyboard is valid for editing. However, when I launch my edittext, a cyrillic keyboard is presented to the user.

我的问题是,我该如何确保只有一个拉丁文键盘psented用户$ P $?

My question is, how do I ensure that only a latin keyboard is presented to the user?

推荐答案

尝试添加到您的XML:

Try to add this to your xml:

<EditText
    android:inputType="text"
    android:digits="0,1,2,3,4,5,6,7,8,9,*,qwertzuiopasdfghjklyxcvbnm" />

这篇关于如何限制psented给用户拉丁Android键盘$ P $?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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