philipy355 / inflearn-compose

0 stars 0 forks source link

docs : Column, Row, Modifier, Text (#3) #4

Open philipy355 opened 8 months ago

philipy355 commented 8 months ago
override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            ComposeStudyTheme {
                // A surface container using the 'background' color from the theme
                Surface(
//                    modifier = Modifier.fillMaxSize(),
                    color = MaterialTheme.colorScheme.background
                ) {
                    Column(
                        modifier = Modifier
                            .fillMaxSize()
                            .background(color = Color.Blue)
                            .padding(16.dp),
                        horizontalAlignment = Alignment.CenterHorizontally,
                        //verticalArrangement = Arrangement.SpaceBetween
                    )
                    {
                        Text("Hello")
                        Text("World")
                    }
                }
            }
        }
    }