Question

I have a fullscreen activity in which I have some editing area. For Android 4.3 and before, I set fullscreen mode with

activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

In the editing view, I use the method described here to get notified when the soft keyboard visibility changes and also to get its height. Everything works fine.

From 4.4, in order to profit immersive mode, the normal mode is set (when status bar is visible) with:

activity.getWindow().getDecorView().setSystemUiVisibility(
                            View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);

But apparently, the method mentioned above to get soft keyboard height is no longer working with getWindowVisibleFrame() returns always the same rectangle whether the keyboard is visible or not.

Here my question: is there any other way to get soft keyboard state and its height on 4.4 that works with SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN?

Thanks in advance.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top