[英]EditText Keyboard Inputtype issue
Which EditText
Keyboard Inputtype
combinaison can help me getting the following view. 哪种
EditText
Keyboard Inputtype
组合可以帮助我获得以下视图。 I try several issue but nothing. 我尝试了几个问题,但一无所获。 May be someone among you does already face this problem.
可能您当中的某人确实已经遇到了这个问题。
What i want to get is Numerics on the top and the possibility to switch to symbols and letters 我想要得到的是顶部的数字,并可以切换到符号和字母
What i want to get if a use touch the EditText must be as following 如果要使用EditText,我想得到什么,必须如下
You may add the following attribute to your EditText
in xml. 您可以将以下属性添加到xml中的
EditText
中。
android:inputType="text|number"
However, some of the characters you input will not be appear - those which conflict with type number , like @ = ! 但是,您输入的某些字符将不会出现-与数字类型冲突的字符,例如@ =! etc.
等等
And in order to get search button (on bottom-right) in your virtual-keyboard, you may use: 为了获得虚拟键盘中的搜索按钮(右下角),您可以使用:
android:imeOptions="actionSearch"
Update Add the following to your EditText's xml and it will get you all the characters available in the keyboard under number inputmode: 更新将以下内容添加到您的EditText的xml中,它将为您提供数字输入模式下键盘上所有可用的字符:
android:inputType="number"
android:digits="0123456789.@#$&*-=()!"':;/?"
If you want to support more characters then simply append their html name in android:digits . 如果要支持更多字符,则只需在android:digits中附加其html名称 。
Try this: 尝试这个:
<EditText
android:layout_width="150dp"
android:layout_height="150dp"
android:inputType="PutHereNestedInputType"
/>
InputTypes 输入类型
Hope it's help. 希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.