Peter
12/20/2023, 5:48 PMImage
without using another Box
like following example. Is there something like Modifier.foreground
, dunno.
Box {
Image(
painter = painterResource(id = R.drawable.bg_home),
contentDescription = null,
modifier = Modifier.fillMaxSize(),
)
Box(
Modifier
.matchParentSize()
.background(
Brush.verticalGradient(
colors = listOf(
Color.Black.copy(alpha = 0f),
Color.Black.copy(alpha = 0.8f),
),
),
)
)
}
romainguy
12/20/2023, 5:53 PMPeter
12/20/2023, 5:54 PM