1

Is there any way to make composable transparent the same way Image can be done with alpha example:

Image(
    painter = painterResource(id = R.drawable.flower),
    contentDescription = null,
    alpha = 0.2F)

I am aware of making background and text transparent, but is there any way to make the whole composable component transparent with parameter alpha = 0.5F

transparency

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Vasil Test
  • 31
  • 2

1 Answers1

2

If you set Modifier.alpha(0.5f) on a Composable contents of that Composable will also have same alpha

Modifier.graphicsLayer{alpha =0.5f} does the same thing.

Thracian
  • 43,021
  • 16
  • 133
  • 222