Android: How to set prefered keyboard view mode from IME
Asked Answered
W

1

8

I am developing an android IME and I want my keyboard to work only "pan and scan" and "resize" mode, not in "fullscreen" (as explained here) or at least request to prefer the "resize" mode. I know that there is a way to set this from EditText but how can I request it from the IME? Is there a method that I can call on onStartInputView event? Or how the android system decide which mode will the IME use?

In one of the note applications in landscape mode the default IME don't use the fullscreen mode, but mine is, so there should be something just I can't find it :S. Maybe it checks the height of the keyboard? If yes how? I would appreciate any ideas, thank you!

Whey answered 1/8, 2015 at 16:55 Comment(0)
H
4

I wrote an IME one year ago and also considered that if my keyboard should run in screen mode in landscape on a tablet.

See this. Override the onEvaluateFullscreenMode callback in the InputMethodService class and return whatever you want.

I don't have a try, but this should work.

Hartsock answered 10/10, 2015 at 9:27 Comment(1)
Thanks, I will try it in an hour!Whey

© 2022 - 2024 — McMap. All rights reserved.