如何弹出" 123" Android键盘 [英] How to pop-up the "?123" Android keyboard

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

问题描述

我有一个需要处理的任何数字和/或字母输入根据国家一个EditText。用户可能在某些情况下,进入任一类型的输入。我只能够使用弹出的手机键盘 setInputType(InputType.TYPE_CLASS_NUMBER); 它的工作原理,但不允许用户一种方式来获得回QWERTY键盘。由于大多数的投入确实是数字,我想present用?123键盘的大部分时间的用户。他们只需要回到QWERTY键盘几次。

I have an EditText which needs to process either numerical and/or alphabetical input depending on state. The user may enter either type of input in some circumstances. I've only been able to pop-up the "Phone" keyboard using setInputType (InputType.TYPE_CLASS_NUMBER); which works, but doesn't allow the user a way to get back to the QWERTY keyboard. Since most of the input is indeed numerical, I would like to present the user with the ?123 keyboard most of the time. They would only need to go back to the QWERTY keyboard a few times.

我如何能弹出屏幕QWERTY键盘输入字母,然后弹出?123键盘,如果它的数值?我只是想为用户节省了一步,使他们不必每次都打在QWERTY键盘上的?123按钮。

How can I pop-up the onscreen QWERTY keyboard for alphabetical input, and then pop-up the "?123" keyboard if it's numerical? I just want to save a step for the user so they don't have to hit the ?123 button on the QWERTY keyboard every time.

更新:这是键盘,我想可见。原因是我想用户输入的字母和数字输入之间轻松切换。没有办法从数字键盘切换到QWERTY键盘。在我的应用程序,数字输入所需的90%的输入的,所以我想流行起来的方便。换句话说,而不必切换到数字键盘90%的时间,他们只需要10%的切换的时间的QWERTY

Update: This is the keyboard I would like visible. The reason is I would like the user to easily switch between Alphabetical input and Numerical input. There is no way to switch to the QWERTY keyboard from the "number pad". In my app, numerical input is required for 90% of the input so I would like to pop it up as a convenience. In other words, rather than having to switch to the numerical keyboard 90% of the time, they only need to switch to QWERTY 10% of the time

input.setRawInputType调用(Configuration.KEYBOARD_QWERTY); 的工作方式不同的蜂窝和更高版本的姜饼的(带来了数字键盘)。在姜饼2.2.3它的工作就是我想要的。蜂窝2.3.7键盘screengrabs是如下,仅供参考。我不知道为什么他们是如此不同。

The call to input.setRawInputType(Configuration.KEYBOARD_QWERTY); works differently on Honeycomb and later versions of Gingerbread (brings up the number pad). On Gingerbread 2.2.3 it works the way I want. Honeycomb and 2.3.7 keyboard screengrabs are below for reference. I don't know why they are so different.

推荐答案

我相信这<一href="http://stackoverflow.com/questions/6153796/how-do-i-default-to-numeric-keyboard-on-edittext-without-forcing-numeric-input">post回答你的问题。

I believe this post answers your question.

在短期添加到您的code:

In short add this to your code:

editText.setRawInputType(Configuration.KEYBOARD_QWERTY);

这篇关于如何弹出&QUOT; 123&QUOT; Android键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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