在XML中指定的虚拟键盘类型的EditText [英] Specifying virtual keyboard type for EditText in XML

查看:174
本文介绍了在XML中指定的虚拟键盘类型的EditText的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个ListActivity。在每个项目我有我创建了一个查看其中包含的RatingBar和一个EditText。在底部的截图中,可以看到虚拟键盘包含returnline键,没有完成键。我想指定一个不同风格的键盘使用(希望留住拼写检查吧)。我想我的虚拟键盘有一个完成键,而不是一个返回键。我可以设置我想在EditText上的XML虚拟键盘的风格?如果是这样,怎么样?

I'm creating a ListActivity. In each list item I have a View I've created which contains a RatingBar and an EditText. In the screenshot at the bottom, you can see the virtual keyboard contains a returnline key and no "Done" key. I would like to specify a different style of keyboard to use (and hopefully retain the spell checking bar). I would like my virtual keyboard to have a "Done" key instead of a return key. Can I set the style of virtual keyboard I'm wanting in the EditText's XML? If so, how?

感谢您的帮助。

推荐答案

尝试安卓imeOptions或TextView的#setImeOptions()。检查<一个href=\"http://developer.android.com/reference/android/widget/TextView.html#attr_android:imeOptions\">docs.

Try android:imeOptions or TextView#setImeOptions(). Check the docs.

这篇关于在XML中指定的虚拟键盘类型的EditText的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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