我怎样才能既有收益,并在一个EditText的softkeyboard一个做钥匙? [英] How can I have both a return and a done keys in an EditText's softkeyboard?

查看:204
本文介绍了我怎样才能既有收益,并在一个EditText的softkeyboard一个做钥匙?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能同时拥有完成(关闭softkeyboard)和回归(换行符)键在我softkeyboard(三星Galaxy 10.1的Andr​​oid 3.1,肖像模式)的一个EditText写作时?

how can I have both a "done" (close the softkeyboard) and a "return" (line break) keys in my softkeyboard (Samsung Galaxy 10.1, Android 3.1, portrait mode) when writing in an EditText?

使用

 <EditText
     android:id="@+id/comment"
     android:layout_width="772dp"
     android:layout_height="200dp"/>

我得到

感谢

推荐答案

这可能取决于应用程序,您可以通过做的意思。
但是,密钥code DPAD_UP和_down(箭头键),通常将光标移动到下一个的EditText

That may depend on the application and what you mean by 'done'. But, the KeyCode DPAD_UP and _DOWN ("arrow keys") will normally move the cursor to the next EditText.

这篇关于我怎样才能既有收益,并在一个EditText的softkeyboard一个做钥匙?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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