Status Update
Comments
ae...@google.com <ae...@google.com>
bl...@gmail.com <bl...@gmail.com> #2
The internal systemBarsForVisualComponents
right now only uses systemBars
, which doesn't include the display cutout:
Updating to systemBars.union(displayCutout)
should fix this, if that's a change we can make.
co...@google.com <co...@google.com>
sg...@google.com <sg...@google.com>
sg...@google.com <sg...@google.com> #3
Thank you for looking into this! It would be crucial to get this right soon as the edge2edge project depends on handling this properly :)
na...@google.com <na...@google.com> #4
Not taking the display cutout into account will impact cars heavily, since some have very large display cutouts:
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Alex Vanyo <
Link:
Add displayCutout to default Material insets
Expand for full commit details
Add displayCutout to default Material insets
Relnote: "Adds displayCutout to the group of insets that Material
components take into account by default, to avoid content overlapping
with the display cutout.
This is a behavior change that will impact how inset-aware
components behave around a display cutout. This includes the default
value of the WindowInsets parameter for inset-aware Material 3
components, and the WindowInsets values provided in the component
Defaults objects for both Material 2 and Material 3.
If this change causes undesirable behavior,
manually specify the WindowInsets parameter on a per-component basis."
Fixes: 362508045
Change-Id: I43ee9ad12db0450ebb9c65ce10d5c39d12628b6c
Files:
- M
compose/material/material/src/androidMain/kotlin/androidx/compose/material/SystemBarsDefaultInsets.android.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/MaterialComponentsInsetSupportTest.kt
- M
compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/internal/SystemBarsDefaultInsets.android.kt
Hash: 692b440ac97b1831d5b35aafff241a98aeeacb93
Date: Wed Dec 18 19:49:15 2024
Description
The most common use case might be showing a backdrop image in the expanded state, while showing only text in the collapsed state.