Thread
#compose
    Patrick Yin

    Patrick Yin

    2 years ago
    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?
    @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

    romainguy

    2 years ago
    The team has been making fixing in the input handling across boundaries. Looks like not all fixes made it to dev16.
    Patrick Yin

    Patrick Yin

    2 years ago
    Ah, nice call. I’m on dev15. It works on dev16. thanks @romainguy