Android Question Android 16 edge-to-edge layout issue (action bar shifted down, status bar icons missing) after targeting SDK 36

kkkpe

Active Member
Licensed User
Longtime User
Hi everyone,
after updating my app to target SDK 36 (as required by Google Play), I noticed a serious UI issue on Android 16 devices:
  • The ActionBar is shifted down, not aligned with the top of the screen.
  • The status bar icons disappear (battery, time, etc.).
To prevent a broken layout for users, I temporarily republished the app with target SDK 35, where the issue does not occur.
After that, Google Play’s review team sent me this message:

"Edge-to-edge display may not be available for all users.
Starting with Android 15, apps targeting SDK 35 are displayed edge-to-edge by default.
Apps targeting SDK 35 must handle window insets properly to ensure correct display on Android 15 and later.
Alternatively, you can call enableEdgeToEdge() (Kotlin) or EdgeToEdge.enable() (Java) for backward compatibility.
One or more APIs or parameters you are using for edge-to-edge or windowed display have been deprecated in Android 15.
Specifically: LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
Found in: androidx.activity.EdgeToEdgeApi28.adjustLayoutInDisplayCutoutMode
Please migrate away from these parameters or APIs."

So, it seems that Android 15+ changes the default behavior of edge-to-edge rendering, and the old parameter LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES is now deprecated.

I would like to ask:
  1. How can we correctly handle edge-to-edge layout in B4A when targeting SDK 36 (Android 15/16)?
  2. Is there a recommended workaround to prevent the ActionBar from being pushed down and status bar icons from disappearing?
  3. Can we apply a fix using JavaObject / Reflection, or do we need to wait for a library update that handles EdgeToEdge.enable() internally?
Thanks in advance for any help or clarification.

Antonio Pellegrino
 
Top