I’m pretty sure I’ve saw this issue posted somewhere before but can’t find it anymore. The problem is when using <android android-target-sdk="19" /> with <window ... fullscreen="true" /> the application will use Android’s Immersive Mode (which is great) but the stage.stageWidth and/or stage.stageHeight will have value as if the navigation bar is still there (I guess this only happen in devices with software navbar like on Nexus devices).
For example on my 2012 Nexus 7 with 4.4.2 using the above configuration will make the Application use Immersive Mode and use the whole screen, but the stage.stageHeight (or portrait) will show value of 1225 instead of the correct 1280.
So my question is
Is this a known issue already
If it is, is there a fix incoming
Or is there any workaround
This problem pretty much defeat the whole purpose of having an immersive mode fullscreen if we can’t really tell the real screen size.
It sounds like entering immersive mode is triggering a resize in the Java level, but it is not actually triggering a “surface changed” event, so perhaps there is somewhere else in Java that the size could be listened to, and pushed back into the C++ process?
I didn’t listen to resize, but I doubt listening to it will change anything. Even when listening to it I still have to use stage.stageWidth/stage.stageHeight to know the new size.
Well, yes. What I’m really asking is whether you waited a few frames before checking stageWidth and stageHeight. (I assume you did, but I just want to be sure.)
So far, onSurfaceChanged is called with the correct widthxheight. But somehow the change is not propagated to Lime/OpenFL. Here is the relevant logcat.