简体   繁体   English

EditText键盘输入类型问题

[英]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.

相关问题 检查带有“ inputType = number”的EditText是否为空 - Check if EditText with “inputType = number” is null 使用带有InputType电子邮件的EditText的AlertDialog - Android - AlertDialog with EditText with InputType email - Android 如何删除 inputType editText 中的自动填充 - How to remove Autofill in inputType editText 自定义键盘:处理inputType更改 - Custom Keyboard: handling inputType change 带有Adjustpan的EditText上的键盘重叠问题不起作用 - Keyboard overlapping issue on EditText with adjustpan not working Android Java-EditText,appendText到inputType数字 - Android Java - EditText, appendText to inputType Number 有关为ClearableEditText定义custom:inputType的问题 - Issue with Defining custom:inputType for ClearableEditText 输入类型为EditText的EditText:textEmailAddress无法使用Espresso键入文本 - EditText with inputType: textEmailAddress not able to type text using Espresso android:inputType =“ textUri”不会启用互联网键盘(带有.com按钮) - android:inputType=“textUri” wont enable internet keyboard (w .com button) setOnEditorActionListener()方法不适用于输入类型textMultiline以及键盘中的Enter键 - setOnEditorActionListener() method not working with inputtype textMultiline along with enter button in keyboard
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM