Project

General

Profile

Actions

Feature #1238

open

Reimplement Display Under Cutouts on Android >= 15 (API >= 35)

Added by Soren Stoutner 4 days ago. Updated 4 days ago.

Status:
New
Priority:
3.x
Start date:
11/29/2024
Due date:
% Done:

0%

Estimated time:

Description

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 Feature #1237: Bump Target API to 35 (Android 15).

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.

Actions #1

Updated by Soren Stoutner 4 days ago

  • Assignee set to Soren Stoutner
Actions #2

Updated by Soren Stoutner 4 days ago

  • Description updated (diff)
Actions

Also available in: Atom PDF