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

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

Introduce Modifier.drawInContainer() and .drawInOverlay() (1/2)

This CL introduces 3 new modifiers:
 - Modifier.container() to define a container in which composables can
   be drawn.
 - Modifier.drawInContainer() to conditionally draw a composable in a
   container.
 - Modifier.drawInOverlay() to draw a composable in an Android overlay,
   i.e. above everything.

Most of the logic in DrawInContainer.kt was forked from AndroidX
implementation of RenderInTransitionOverlayNodeElement.kt [1]. I decided
to change the name "overlay" there to "container" to avoid confusing
them with Android overlays or even SceneTransitionLayout overlays.

The drawInOverlay() modifier is currently a @Composable factory because
of b/374907972.

[1] http://shortn/_hUx8cyTKAw

Bug: 373799480
Test: atest DrawInContainerScreenshotTest
Flag: com.android.systemui.scene_container
Change-Id: I415c6079e8ac8cf28804ca0fef350dc5d66b3609
parent 669d20ab
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