Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8c2acf8c authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Introduce sharedElement.elevateInContent (1/2)

This CL introduces a new elevateInContent parameter to draw an element
above all other composables in its content (scene/overlay). It
allows to prevent elements from being clipped by a parent (like a
scrollable list) while still being drawn in the same content, therefore
keeping a relatively similar zIndex in the whole SceneTransitionLayout
compared to other scenes and overlays.

The first version of this CL had `elevateInContent` be a simple
`Boolean`. However, doing so would require us to instrument all scenes
and overlays to always use Modifier.container(), and all elements to use
Modifier.drawInContainer(), which are most of the time not necessary.
Making elevateInContent by a `ContentKey?` allows to only compose these
modifiers when necessary.

Note that using this parameter can currently lead to some strange issues
where text is not drawn (see b/374257277). I expect this to be fixed in
the Compose libraries directly in the future.

Bug: 373799480
Test: atest ElevateInContentScreenshotTest
Flag: com.android.systemui.scene_container
Change-Id: Ifa9e65ade0bc7bab01c80c0eb77c5424db13047f
parent ea18b6d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment