How to make textfield not covered by keyboard in Android

Virtual keyboard in Android can cover textfield, so user doesn’t see what he is entering.
Are there any way to make textfield to stay visible? It works automatically in Adobe Air.
Here are screenshots to explain what I mean.

Covered by keyboard:

What happens in Adobe AIR?

It moves the screen in my case and on some phones it just divides the screen into two parts: keyboard and textfield, nothing else.
No keyboard:

With keyboard:

Ok, I just did it myself, just listen to FocusEvent.FOCUS_IN and FocusEvent.FOCUS_OUT events and move the whole screen up and down.

How did you get the soft keyboard suggestion tab on your phone to appear when using openfl? Thanks.

Sorry, I don’t understand what you mean. Can you elaborate?

Yeah of course sorry for not being more clear. So if you take a look at your image. to the right of the google icon on the keyboard you have the words I’m , I , yes . Those are the suggested words for the keyboard currently when I target both ios or android I don’t get suggested words is that only possible to be shown for air targeting mobile do you get those when natively targeting ?

This screenshot is from Adobe Air game, so only works there, I guess, and not on OpenFL.
I really didn’t pay attention to this before.

1 Like

I think this has to do with the keyboard type, we might be using a type that does not suggest words, perhaps due to problems we had before with certain Android keyboards

We are having the same issue as the original post - and have used the same solution discussed here with FOCUS_IN and FOCUS_OUT events. However, we can’t catch an event for when the user dismisses the virtual keyboard on Android using the soft key. Would you mind sharing how you handled this case?

Using OpenFL 8.9.1, Lime 7.5.0.

I’m not doing anything special, just this:

txt.removeEventListener(FocusEvent.FOCUS_IN, onFocusIn);
txt.removeEventListener(FocusEvent.FOCUS_OUT, onFocusOut);
I’m not sure what soft button you are talking about, but pressing Android Back button, doesn’t fire FOCUS_OUT in my case, but focus stays at TextField, so makes sense.