Skip to content

Commit 157f9f1

Browse files
author
eshc123
committed
FEAT: TukApp 추가
1 parent f4e0c55 commit 157f9f1

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

feature/main/src/main/java/com/plottwist/feature/main/MainActivity.kt

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,21 @@ import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
66
import 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
147
import com.plottwist.feature.main.ui.theme.TukTheme
158

169
class 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-
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
}

0 commit comments

Comments
 (0)