File tree Expand file tree Collapse file tree 2 files changed +28
-29
lines changed
feature/main/src/main/java/com/plottwist/feature/main Expand file tree Collapse file tree 2 files changed +28
-29
lines changed Original file line number Diff line number Diff line change @@ -4,44 +4,21 @@ import android.os.Bundle
44import androidx.activity.ComponentActivity
55import androidx.activity.compose.setContent
66import androidx.activity.enableEdgeToEdge
7- import androidx.compose.foundation.layout.fillMaxSize
8- import androidx.compose.foundation.layout.padding
9- import androidx.compose.material3.Scaffold
10- import androidx.compose.material3.Text
11- import androidx.compose.runtime.Composable
12- import androidx.compose.ui.Modifier
13- import androidx.compose.ui.tooling.preview.Preview
147import com.plottwist.feature.main.ui.theme.TukTheme
158
169class MainActivity : ComponentActivity () {
1710 override fun onCreate (savedInstanceState : Bundle ? ) {
1811 super .onCreate(savedInstanceState)
1912 enableEdgeToEdge()
13+
14+ setComposeContent()
15+ }
16+
17+ private fun setComposeContent () {
2018 setContent {
2119 TukTheme {
22- Scaffold (modifier = Modifier .fillMaxSize()) { innerPadding ->
23- Greeting (
24- name = " Android" ,
25- modifier = Modifier .padding(innerPadding)
26- )
27- }
20+ TukApp ()
2821 }
2922 }
3023 }
3124}
32-
33- @Composable
34- fun Greeting (name : String , modifier : Modifier = Modifier ) {
35- Text (
36- text = " Hello $name !" ,
37- modifier = modifier
38- )
39- }
40-
41- @Preview(showBackground = true )
42- @Composable
43- fun GreetingPreview () {
44- TukTheme {
45- Greeting (" Android" )
46- }
47- }
Original file line number Diff line number Diff line change 1+ package com.plottwist.feature.main
2+
3+ import androidx.compose.foundation.layout.fillMaxSize
4+ import androidx.compose.foundation.layout.padding
5+ import androidx.compose.material3.Scaffold
6+ import androidx.compose.material3.Text
7+ import androidx.compose.runtime.Composable
8+ import androidx.compose.ui.Modifier
9+
10+ @Composable
11+ fun TukApp (
12+ modifier : Modifier = Modifier
13+ ) {
14+ Scaffold (
15+ modifier = modifier.fillMaxSize()
16+ ) { innerPadding ->
17+ Text (
18+ modifier = Modifier .padding(innerPadding),
19+ text = " Tuk"
20+ )
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments