Project

General

Profile

Feature #1238

Updated by Soren Stoutner 5 days ago

Android changed the way they handled cutouts in Android 15 (API >= 35). 

 https://developer.android.com/about/versions/15/behavior-changes-15#ux 

 The effect of this is that, while using Material Components (com.google.android.material), `LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS` 

 https://developer.android.com/reference/android/view/WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS 

 does nothing if `setFitsSystemWindows` has ever been `true`. 

 https://developer.android.com/reference/android/view/View#setFitsSystemWindows(boolean) 

 This prevents switching in and out of full-screen browsing mode with displaying under the cutouts enabled in full-screen browsing mode but not otherwise.    This option was removed for API >=35 in ##1237. 

 The fix probably involves switching to Material 3 Components ( androidx.compose.material3), mentioned in the original article, but doing so would be a significant UI overhaul.    I am not inclined to go that route just for this feature, but if I end up switching to Material 3 (or whatever comes along after it) for other reasons, then it would be worth looking at reimplementing displaying under the cutouts in full-screen browsing mode.

Back