Skip to content

Instantly share code, notes, and snippets.

@veroanggra
Created February 22, 2023 18:01
Show Gist options
  • Save veroanggra/bbd805b71811b9f4c5a806cf5903a1e5 to your computer and use it in GitHub Desktop.
Save veroanggra/bbd805b71811b9f4c5a806cf5903a1e5 to your computer and use it in GitHub Desktop.
package com.veroanggra.migratingsample
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.veroanggra.composesubmission.ui.theme.PlayingWithComposeTheme
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
PlayingWithComposeTheme {
Surface() {
RowArrange(modifier = Modifier)
}
}
}
}
}
@Composable
fun RowArrange(modifier: Modifier) {
Row(modifier = modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceEvenly) {
Text(text = "Row1")
Text(text = "Row2")
Text(text = "Row3")
Text(text = "Row4")
Text(text = "Row5")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment