fengdai
10/28/2019, 8:36 AMViewGroup.setContent
(in Wrapper) and ViewGroup.setViewContent
(in Compose)?Luca Nicoletti
10/28/2019, 9:57 AMCompose.composeInto
one of them returns a nullable CompositionContext
the other instead does not allows nullablefengdai
10/28/2019, 10:04 AMAndrey Kulikov
10/28/2019, 11:24 AMfengdai
10/28/2019, 11:53 AMsetViewContent
, but the code can not be complied:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setViewContent {
TextView(this)
}
}
}
Andrey Kulikov
10/28/2019, 12:02 PMthis
and instead add something like text = "Test"
it should compilefengdai
10/28/2019, 12:10 PMAndrey Kulikov
10/28/2019, 12:15 PMfengdai
10/28/2019, 12:20 PM