Group into one method
This commit is contained in:
parent
ad70b401c6
commit
4d0e9a3e0a
1 changed files with 12 additions and 11 deletions
|
@ -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!")
|
||||||
}
|
}
|
Reference in a new issue