Android的软键盘操作按钮 [英] Android Soft keyboard action button
问题描述
我的布局具有4的EditText的意见和提交按钮来查看。我需要有下一步按钮,第3的EditText的和地方的软键盘的新线键完成的第4场的EditText按钮。
My layout has 4 EditText views and a submit Button view. I need to have "Next" button for the first 3 EditText's and a "Done" button for 4th EditText field in place of a "New Line" key of soft keyboard.
如何才能做到这一点?
推荐答案
在你的布局,只需设置XML属性安卓imeOptions =actionNext
为您前三文本框和机器人:imeOptions =actionDone
最后一个
In your layout, just set the XML attributes android:imeOptions="actionNext"
for your first three text boxes and android:imeOptions="actionDone"
for the last one.
请参阅:<一href="http://developer.android.com/reference/android/widget/TextView.html#attr_android%3aimeOptions">android:imeOptions文档
此外,还有在培训文档一个小的XML的例子。
Also, there's a small XML example in the training docs.
这篇关于Android的软键盘操作按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!