Eric Ampire [MOD]
06/15/2021, 6:58 PM@Composable
fun TestCardClickable() {
Card(
backgroundColor = Color.Red,
modifier = Modifier.size(100.dp).clickable {
Timber.e("Click")
},
content = {
}
)
}
Andrew Neal
06/15/2021, 7:05 PMCard
contains its own onClick
parameter as of beta08. So, yours isn't being consumed because it already has one.
BEHAVIOUR-BREAKING: Card now consumes clicks, making clicks added viato be a no-op. Please, use new experimental overload of a Card that accepts onClick. (Ia8744, b/183775620)Card(Modifier.clickable)
Added a new Card overload that handles clicks as well as other clickable functionality: indication, interactionSource, enabled/disabled. It wasn't possible to use a regular non-clickable Card with thebecause the Card will not clip the ripple indication in those cases.Modifier.clickable
Eric Ampire [MOD]
06/15/2021, 7:07 PM