0

I need to make a card (or other type of layout) with the design you can see below.

enter image description here

enter image description here

The problem: I don't know how to apply this kind of glassmorphism/blur effect to the bottom of the image where the text is.

I leave you the code that I have done below to make it easier. For the tests I'm using an image taken from Google, I think it has no influence.

@Preview
@Composable
fun BoxCard() {
    Card(elevation = 0.dp, shape = RectangleShape) {
        Box(contentAlignment = Alignment.BottomCenter) {
            Image(
                painter = painterResource(id = R.drawable.scale),
                contentDescription = null,
                contentScale = ContentScale.Fit
            )

            Box(
                modifier = Modifier
                    .fillMaxWidth()
                    .height(45.dp)
                    .background(Color.White)
            ) {
                Column(modifier = Modifier.padding(horizontal = 12.dp, vertical = 4.dp)) {
                    Text(text = "Title Title")
                    Text(text = "Subtitle Subtitle")
                }
            }
        }
    }
}
R0ck
  • 409
  • 1
  • 15

1 Answers1

0

there is a blur modifier, but works only with Android 12 and above.

Modifier.blur(radius = 4.dp)