Android EditText监听输入
我有一个 EditText,我放置了一个 OnEditorActionListener 来在按下 Enter 时执行某些操作。我愚蠢的问题是:如何像地图中那样将 ENTER 键设为绿色?
I have a EditText ans I put an OnEditorActionListener
to do something when enter is pressed. My silly question is: how to make the ENTER key green like in Maps?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是我在这里找到的答案:
在 XML 中为 EditText 指定虚拟键盘类型< /a>
使用 时间选项
Here's an answer I found here:
Specifying virtual keyboard type for EditText in XML
Play around with ime options
谢谢你们的帮助。我通过将
android:imeOptions="actionGo"
和android:inputType="textImeMultiLine"
放在布局中作为 EditText 的属性来解决这个问题。两者缺一不可!再次感谢您!
Thank you guys for the help. I solved it by putting
android:imeOptions="actionGo"
andandroid:inputType="textImeMultiLine"
in the layout as attributes to the EditText. Both are necessary!Again thank you!
还没有测试过,但你可以尝试这个(部分“编辑文本”)。
Haven't tested it but you can try this (section "EditText").