One question about wrapping the classic android vi...
# compose
p
One question about wrapping the classic android view inside of a compose component: See code below, if you click TextView area, it’s not clickable, but if you click the Box’s padding area, it’s clickable. And if replace
emitView(::TextView)
with a compose
Text("")
, it works well. Is it an intentional behavior? Or there is something wrong?
Copy code
@Composable
fun MarketLabel(text: String) {
//  Android classic view
  emitView(::TextView) {
    it.text = text
  }
}

@Composable
fun SomeThing() {
  Box(
    modifier = Modifier
      .clickable(
        onClick = {
          doingSomething()
        }
      )
      .padding(16.dp)
  ) {
    MarketLabel("Test")
  }
}
r
The team has been making fixing in the input handling across boundaries. Looks like not all fixes made it to dev16.
p
Ah, nice call. I’m on dev15. It works on dev16. thanks @romainguy