Skip to content

Commit e01eb48

Browse files
authored
Merge pull request #65 from YAPP-Github/feature/#22-start-up-ui
[Feature/#22] 앱 최초 실행 화면 흐름 구현
2 parents 691658a + 0144038 commit e01eb48

40 files changed

+2649
-51
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
android:allowBackup="true"
1010
android:dataExtractionRules="@xml/data_extraction_rules"
1111
android:fullBackupContent="@xml/backup_rules"
12-
android:icon="@mipmap/ic_launcher"
12+
android:icon="@mipmap/ic_bitnagil_launcher"
1313
android:label="@string/app_name"
14-
android:roundIcon="@mipmap/ic_launcher_round"
14+
android:roundIcon="@mipmap/ic_bitnagil_launcher_round"
1515
android:supportsRtl="true"
1616
android:theme="@style/Theme.Bitnagil"
1717
tools:targetApi="31">
17.6 KB
Loading

app/src/main/java/com/threegap/bitnagil/MainActivity.kt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package com.threegap.bitnagil
22

3+
import android.graphics.Color
4+
import android.os.Build
35
import android.os.Bundle
46
import androidx.activity.ComponentActivity
7+
import androidx.activity.SystemBarStyle
58
import androidx.activity.compose.setContent
69
import androidx.activity.enableEdgeToEdge
710
import androidx.compose.foundation.layout.Box
@@ -20,8 +23,20 @@ import dagger.hilt.android.AndroidEntryPoint
2023
class MainActivity : ComponentActivity() {
2124
override fun onCreate(savedInstanceState: Bundle?) {
2225
super.onCreate(savedInstanceState)
23-
enableEdgeToEdge()
26+
enableEdgeToEdge(
27+
statusBarStyle = SystemBarStyle.light(
28+
scrim = Color.TRANSPARENT,
29+
darkScrim = Color.TRANSPARENT,
30+
),
31+
navigationBarStyle = SystemBarStyle.light(
32+
scrim = Color.TRANSPARENT,
33+
darkScrim = Color.TRANSPARENT,
34+
),
35+
)
2436
setContent {
37+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
38+
window.isNavigationBarContrastEnforced = false
39+
}
2540
val mainNavigator = rememberMainNavigator()
2641
val globalToast = rememberBitnagilToast()
2742

app/src/main/java/com/threegap/bitnagil/MainNavHost.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ fun MainNavHost(
3333
) {
3434
composable<Route.Splash> {
3535
SplashScreenContainer(
36-
navigateToIntro = { navigator.navController.navigate(Route.Intro) },
36+
navigateToIntro = {
37+
navigator.navController.navigate(Route.Intro) {
38+
popUpTo<Route.Splash> { inclusive = true }
39+
}
40+
},
3741
navigateToHome = {
3842
navigator.navController.navigate(Route.Home) {
3943
popUpTo(navigator.navController.graph.startDestinationId) {

app/src/main/java/com/threegap/bitnagil/MainScreen.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
package com.threegap.bitnagil
22

3+
import androidx.compose.foundation.layout.WindowInsets
4+
import androidx.compose.foundation.layout.WindowInsetsSides
35
import androidx.compose.foundation.layout.fillMaxSize
6+
import androidx.compose.foundation.layout.only
47
import androidx.compose.foundation.layout.padding
8+
import androidx.compose.foundation.layout.systemBars
59
import androidx.compose.material3.Scaffold
610
import androidx.compose.runtime.Composable
711
import androidx.compose.ui.Modifier
12+
import com.threegap.bitnagil.designsystem.BitnagilTheme
813

914
@Composable
1015
fun MainScreen(
@@ -13,6 +18,8 @@ fun MainScreen(
1318
) {
1419
Scaffold(
1520
modifier = modifier.fillMaxSize(),
21+
contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Bottom),
22+
containerColor = BitnagilTheme.colors.white,
1623
) { innerPadding ->
1724
MainNavHost(
1825
navigator = navigator,

app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavHost.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fun HomeNavHost(
4747

4848
DoubleBackButtonPressedHandler()
4949

50-
Box(modifier = Modifier.fillMaxSize()) {
50+
Box(modifier = modifier.fillMaxSize()) {
5151
Scaffold(
5252
modifier = Modifier.fillMaxSize(),
5353
bottomBar = {

app/src/main/res/drawable/ic_bitnagil_launcher_foreground.xml

Lines changed: 42 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_bitnagil_launcher_background"/>
4+
<foreground android:drawable="@drawable/ic_bitnagil_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_bitnagil_launcher_background"/>
4+
<foreground android:drawable="@drawable/ic_bitnagil_launcher_foreground"/>
5+
</adaptive-icon>
910 Bytes
Loading

0 commit comments

Comments
 (0)