How to get keyboard with Next, Previous and Done b

2019-09-20 09:33发布

问题:

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.