Kotlin Compose 脚手架Scaffold

package com.anguomob.jecpack.activity.compose.layout

import androidx.compose.foundation.indication
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

@Composable
fun LayoutStudy() {
    Scaffold(topBar = {
        TopAppBar(
            title = { Text(text = "LayoutStudy") },
            actions = {
                IconButton(
                    onClick = { },

                    ) {
                    Icon(imageVector = Icons.Filled.Favorite, contentDescription = null)
                }
            }
        )
    }) { innerPadding ->
        BodyContent(Modifier.padding(innerPadding))
    }
}

@Composable
fun BodyContent(modifier: Modifier = Modifier) {
    Column(modifier = modifier.padding(8.dp)) {
        Text(text = "Hi there~!")
        Text(text = "Thanks for goding through the LayoutStudy")
    }
}

Kotlin Compose 脚手架Scaffold_第1张图片

 

你可能感兴趣的:(#,038Compose,kotlin,android,java)