Make buttons transparent with Jetpack Compose

shogo.yamada
Jul 4, 2022

--

Photo by Arnold Francisca on Unsplash

We leave you with instructions on how to make a button drop.

Button(
onClick = { /* Do something */ },
colors = ButtonDefaults.buttonColors(
backgroundColor = Color.Black.copy(
alpha = 0.7F,
),
),
modifier = Modifier
.height(
48.dp
)
.width(
148.dp
),
shape = RoundedCornerShape(10.dp)
) {
Text(
text = "透過のボタン",
color = Color.White,
fontSize = 14.sp
)
}

--

--

shogo.yamada
shogo.yamada

Written by shogo.yamada

普段はエンジニアやってます👨‍💻 自分の資産運用の記録として書いてり、プライベートなことを書いていきます。

Responses (1)