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(),
|
||||
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!")
|
||||
}
|
Reference in a new issue