Android: Properly handle rotations#3356
Conversation
ConfigurationChanged is not sent on all Android versions because of various bugs in the operating system. Instead SurfaceChanged is used which is consistent with what SDL does. Also Window events are not filtered anymore when in the background. This is required on Android, otherwise rotations are lost.
|
Here the Android documentation about this btw (with remarks by me) On Android 7.0 (API level 24) and higher, Activity recreation only occurs for size-based configuration changes if the size change is significant (?? What is Significant ??). When the system doesn't recreate an Activity due to insufficient size, the system might call Activity.onConfigurationChanged() and View.onConfigurationChanged() instead. There are some caveats to observe regarding the Activity and View callbacks when the Activity isn't recreated:
For code that is dependent on listening for size-based configuration changes, we recommend using a utility View with an overridden View.onConfigurationChanged() instead of relying on Activity recreation or Activity.onConfigurationChanged(). Well yeah except when its broken on Android 13 -_- |
Android: Properly handle rotations
ConfigurationChanged is not sent on all Android versions because of various bugs in the operating system. Instead SurfaceChanged is used which is consistent with what SDL does.
Also Window events are not filtered anymore when in the background. This is required on Android, otherwise rotations are lost.
Confirmed by lusciouslover in chat that the rotation issue is fixed.