Hi, does anyone see an error in this piece of code...
# compose
e
Hi, does anyone see an error in this piece of code that would prevent the card from reacting to the click?
Copy code
@Composable
fun TestCardClickable() {
  Card(
    backgroundColor = Color.Red,
    modifier = Modifier.size(100.dp).clickable {
      Timber.e("Click")
    },
    content = {

    }
  )
}
a
Card
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 via 
Card(Modifier.clickable)
 to be a no-op. Please, use new experimental overload of a Card that accepts onClick. (Ia8744b/183775620)
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 the 
Modifier.clickable
 because the Card will not clip the ripple indication in those cases.
e
Thanks, I hadn't read the last release note
👍 1