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