Group into one method

This commit is contained in:
Mylloon 2023-11-18 18:38:16 +01:00
parent ad70b401c6
commit 4d0e9a3e0a
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -22,7 +22,7 @@ class MainActivity : ComponentActivity() {
modifier = Modifier.fillMaxSize(), modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background color = MaterialTheme.colorScheme.background
) { ) {
Greeting("Android") ScreenMainMainActivity()
} }
} }
} }
@ -30,17 +30,18 @@ class MainActivity : ComponentActivity() {
} }
@Composable @Composable
fun Greeting(name: String, modifier: Modifier = Modifier) { fun ScreenMainMainActivity() {
Text( MainMainActivity()
text = "Hello $name!",
modifier = modifier
)
} }
@Preview(showBackground = true) @Preview(showBackground = true)
@Composable @Composable
fun GreetingPreview() { fun ScreenMainActivityPreview() {
MemorisationApplicationTheme { MainMainActivity()
Greeting("Android") }
}
}
@Composable
fun MainMainActivity() {
Text("Hello world!")
}