How to get Context in Jetpack Compose

前端 未结 7 1699
情歌与酒
情歌与酒 2021-02-19 07:35
fun createListItem(itemIndex: Int) {
Padding(left = 8.dp, right = 8.dp, top = 8.dp, bottom = 8.dp) {
    FlexRow(crossAxisAlignment = CrossAxisAlignment.Center) {
               


        
7条回答
  •  遇见更好的自我
    2021-02-19 07:51

    I think your never show Toast normal way. Jetpack Compose uses a custom Kotlin compiler plugin to transform these composable functions into the app's UI elements. For example, the Text() function is defined by the Compose UI library. Jetpack Compose is in very early stages of development. You can see all repo of Jetpack compose with sample and integrations test check below link

    https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/ui

    For jetpack compose material demo check this link

    https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos

提交回复
热议问题