Open Sanva opened 3 years ago
[...] it would suffice if Window.notifyOnResize would be fired because of the screen dimensions changing... but it is not the case.
That actually looks like a bug in Android 8, or something — I've found references about the underlying Android method (ANativeActivityCallbacks.onNativeWindowResized
) firing when screen rotation changes, so I've tested it with another phone:
ANativeActivityCallbacks.onNativeWindowResized
not getting called when screen orientation changes.ANativeActivityCallbacks.onNativeWindowResized
gets called when screen orientation changes.
Describe the solution you'd like An Android implementation for
kha.System.screenRotation
— and a notification about the screen change would be even more awesome.Describe alternatives you've considered Constantly polling window dimensions — it is something that can work in simple cases... but not for everything.
In fact, in my specific case (resizing and repositioning screen elements, like a gamepad) it would suffice if
Window.notifyOnResize
would be fired because of the screen dimensions changing... but it is not the case.