Compare commits

...

2 Commits

Author SHA1 Message Date
Arquimedes b2e590e959
Merge 7c97ba3200 into 46ee6a3848 2024-09-18 18:20:22 +03:00
Arquimedes 7c97ba3200
Update SDLActivity.java
Fix Full immersive mode in Android 9 and higher.

LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
will make sure to use all the screen when  the fullscreen flag is enabled.

The other option is 
LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS will work in some cases but in devices that have a camera in the middle this flag will not work.
2024-09-15 03:49:45 -03:00
1 changed files with 5 additions and 0 deletions

View File

@ -790,6 +790,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
SDLActivity.mFullscreenModeActive = false;
}
if (Build.VERSION.SDK_INT >= 28 /* Android 9 (Pie) */) {
window.getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
}
}
} else {
Log.e(TAG, "error handling message, getContext() returned no Activity");