How to get keyboard with Next, Previous and Done buttons at the top of keyboard in Android

巧了我就是萌 提交于 2019-12-13 08:22:22

问题


In my application, I want to provide the functionality similar to Next, Previous and Done button at the top of keyboard. It is somewhat similar to this

Please let me know how can I achieve this.

I do not want to exactly implement the next,previous and done options. But using this three button click, I want to make three separate web service calls and fetch the results. Like, Active,Inactive and All kind of filters.


回答1:


The standard Android way would be to provide an input method action with imeOptions. With the standard keyboard this will change the bottom right virtual keyboard button to the specified action. There's little point in trying to mimic iOS input behavior with the buttons above.




回答2:


Do you want to just put the layout above the keyboard,so as to stop next,previous,etc button when keyboard is displayed. If so,you can try adding below code inside your activity in android manifest,

android:windowSoftInputMode="adjustResize"

If you are looking for something else,then please show your xml code of the same.



来源:https://stackoverflow.com/questions/21305618/how-to-get-keyboard-with-next-previous-and-done-buttons-at-the-top-of-keyboard

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