https://kotlinlang.org logo
#compose
Title
# compose
g

georgiy.shur

09/21/2020, 12:23 PM
Hi. What is the best way to make an opaque color overlay over an image (safety gradient) in Compose? Creating a surface just for it seems like an overkill and it seems there is nothing like foreground modifier.
m

matvei

09/21/2020, 12:28 PM
with
Modifier.drawWithContent
you can draw the underlying content at any point (by calling
drawContent()
), so you can make it to be a foreground.
👍 2
3 Views