Home > database >  How to set on softkeyboard how much to push the content with adjustpan
How to set on softkeyboard how much to push the content with adjustpan

Time:12-09

I would like to use adjustpan in my activity instead of adjustresize, currently the way adjustpan works is if you focus on a keyboard the content pushes upwards, how can set by how much the content is being pushed?

enter image description here

This is how the content looks with adjustpan for example, how can I push it a bit more so the button is not covered by the keyboard without using adjustresize?

CodePudding user response:

You can try out using this:

 android:windowSoftInputMode="stateAlwaysHidden|adjustResize"

CodePudding user response:

There isn't any way to do that. The system takes care of it, and there's no input by the app. The only promise is that after the keyboard comes up that the cursor will be visible onscreen.

In practice you probably wouldn't want to do this anyway- different keyboards are different heights, and what you'd want for one won't be right for others.

(You actually probably could do this as the keyboard, since the amount scrolled is controlled by the height of the keyboard, which is determined by the onComputeInsets of the InputMethodService. But its not controlled by the app).

  • Related