How can I have both a return and a done keys in an EditText's softkeyboard?

左心房为你撑大大i 提交于 2019-12-10 15:54:56

问题


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?

Using

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

I get

Thanks


回答1:


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.



来源:https://stackoverflow.com/questions/9016351/how-can-i-have-both-a-return-and-a-done-keys-in-an-edittexts-softkeyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!