【发布时间】:2022-12-18 09:09:28
【问题描述】:
我有一张卡片,我希望它变成透明的,但不是里面的内容。问题是我不知道为什么里面的东西变透明了。每颗彗星都会受到赞赏!
Card(
modifier = Modifier
.wrapContentHeight()
.fillMaxWidth()
.align(Alignment.CenterHorizontally)
.padding(start = NORMAL_PADDING, end = NORMAL_PADDING, top = NEARLY_MEDIUM_PADDING)
.alpha(0.4f),
shape = RoundedCornerShape(HALF_PADDING),
colors = CardDefaults.cardColors(
containerColor = CardColor.copy(0.1f),
contentColor = CardColor.copy(1f)
)
)
【问题讨论】:
标签: android android-jetpack-compose background-color android-cardview