Created
February 22, 2023 18:01
-
-
Save veroanggra/bbd805b71811b9f4c5a806cf5903a1e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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