简体   繁体   English

Android虚拟键盘删除空格按钮

[英]android virtual keyboard remove white space button

I want to stop user from entering white space into the edittext, easiest way is to do not have button in keyboard appearing on click. 我想阻止用户在edittext中输入空格,最简单的方法是单击时没有键盘上的按钮出现。

how to hide white space button from keyboard ? 如何隐藏键盘上的空白按钮?

or is there any other way to stop user entering white space into the edit text field. 还是有其他方法可以阻止用户在编辑文本字段中输入空格。

The best way would be to do it programatically... the only thing you have to do is setting a listener to the EditText and remove all the "spaces" while the user is writing. 最好的方法是以编程方式执行此操作...您唯一要做的就是将一个侦听器设置为EditText,并在用户编写时删除所有“空格”。 I think this is the best choice because there are some handsets that have a real keyboard that you can't obviously modify. 我认为这是最好的选择,因为有些手机带有真正的键盘,您显然无法对其进行修改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM