Skip to content

Commit 0412fea

Browse files
authored
Merge pull request #32 from YAPP-Github/feature/NDGL-105
[NDGL-105] 앱 아이콘, 스플래시 화면, 유저 가이드 모달 추가
2 parents 8f9a120 + 822c7ab commit 0412fea

37 files changed

Lines changed: 398 additions & 57 deletions

File tree

app/build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ android {
1515

1616
defaultConfig {
1717
manifestPlaceholders["MAPS_API_KEY"] = localProperties.getProperty("MAPS_API_KEY", "")
18+
buildConfigField("String", "NDGL_TERMS_URL", "\"${localProperties.getProperty("NDGL_TERMS_URL", "")}\"")
1819
}
1920

2021
signingConfigs {
@@ -58,8 +59,8 @@ android {
5859
dependencies {
5960
implementation(project(":navigation"))
6061

62+
implementation(project(":feature:splash"))
6163
implementation(project(":feature:home"))
62-
implementation(project(":feature:auth"))
6364
implementation(project(":feature:travel"))
6465
implementation(project(":feature:travel-helper"))
6566

@@ -70,4 +71,5 @@ dependencies {
7071
implementation(libs.androidx.navigation3.runtime)
7172
implementation(libs.androidx.navigation3.ui)
7273
implementation(libs.androidx.lifecycle.viewmodel.navigation3)
74+
implementation(libs.androidx.core.splashscreen)
7375
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
android:dataExtractionRules="@xml/data_extraction_rules"
1111
android:fullBackupContent="@xml/backup_rules"
1212
android:icon="@mipmap/ic_launcher"
13-
android:label="@string/app_name"
1413
android:roundIcon="@mipmap/ic_launcher_round"
1514
android:supportsRtl="true"
1615
android:theme="@style/Theme.NDGL"
@@ -24,7 +23,7 @@
2423
android:name=".MainActivity"
2524
android:exported="true"
2625
android:label="@string/app_name"
27-
android:theme="@style/Theme.NDGL">
26+
android:theme="@style/Theme.NDGL.Splash">
2827
<intent-filter>
2928
<action android:name="android.intent.action.MAIN" />
3029

19.9 KB
Loading

app/src/main/java/com/yapp/ndgl/MainActivity.kt

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,60 @@ import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
66
import androidx.activity.enableEdgeToEdge
7+
import androidx.compose.animation.AnimatedContent
8+
import androidx.compose.runtime.getValue
9+
import androidx.compose.runtime.mutableStateOf
10+
import androidx.compose.runtime.saveable.rememberSaveable
11+
import androidx.compose.runtime.setValue
12+
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
13+
import com.yapp.ndgl.core.ui.designsystem.UserGuideModal
714
import com.yapp.ndgl.core.ui.theme.NDGLTheme
15+
import com.yapp.ndgl.core.ui.util.launchBrowser
16+
import com.yapp.ndgl.feature.splash.SplashRoute
17+
import com.yapp.ndgl.navigation.AppScreen
818
import com.yapp.ndgl.ui.NDGLApp
919
import dagger.hilt.android.AndroidEntryPoint
1020

1121
@AndroidEntryPoint
1222
class MainActivity : ComponentActivity() {
1323
override fun onCreate(savedInstanceState: Bundle?) {
1424
super.onCreate(savedInstanceState)
25+
installSplashScreen()
1526
enableEdgeToEdge()
1627
setContent {
1728
NDGLTheme {
18-
NDGLApp()
29+
var currentScreen by rememberSaveable { mutableStateOf(AppScreen.Splash) }
30+
var showUserGuideModal by rememberSaveable { mutableStateOf(false) }
31+
32+
AnimatedContent(
33+
targetState = currentScreen,
34+
) { screen ->
35+
when (screen) {
36+
AppScreen.Splash -> {
37+
SplashRoute(
38+
navigateToHome = { isFirstUser ->
39+
showUserGuideModal = isFirstUser
40+
currentScreen = AppScreen.Main
41+
},
42+
)
43+
}
44+
45+
AppScreen.Main -> {
46+
NDGLApp()
47+
}
48+
}
49+
}
50+
51+
if (showUserGuideModal) {
52+
UserGuideModal(
53+
onConfirmClick = {
54+
showUserGuideModal = false
55+
},
56+
onTermsClick = {
57+
launchBrowser(BuildConfig.NDGL_TERMS_URL)
58+
},
59+
)
60+
}
1961
}
2062
}
2163
}
Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2-
xmlns:aapt="http://schemas.android.com/aapt"
32
android:width="108dp"
43
android:height="108dp"
5-
android:viewportWidth="108"
4+
android:viewportWidth="72"
65
android:viewportHeight="108">
7-
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
8-
<aapt:attr name="android:fillColor">
9-
<gradient
10-
android:endX="85.84757"
11-
android:endY="92.4963"
12-
android:startX="42.9492"
13-
android:startY="49.59793"
14-
android:type="linear">
15-
<item
16-
android:color="#44000000"
17-
android:offset="0.0" />
18-
<item
19-
android:color="#00000000"
20-
android:offset="1.0" />
21-
</gradient>
22-
</aapt:attr>
23-
</path>
24-
<path
25-
android:fillColor="#FFFFFF"
26-
android:fillType="nonZero"
27-
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
28-
android:strokeWidth="1"
29-
android:strokeColor="#00000000" />
6+
<group android:scaleX="0.3"
7+
android:scaleY="0.45"
8+
android:translateX="25.2"
9+
android:translateY="29.7">
10+
<group>
11+
<clip-path
12+
android:pathData="M0,0h72v108h-72z"/>
13+
<path
14+
android:pathData="M71.94,84.56C71.67,81.8 70.14,79.07 67.54,77.47C63.79,75.16 59.15,75.75 55.79,78.72L48.35,71.56L61.36,58.49C67.9,51.92 70.67,42.67 70.38,33.56C69.52,14.19 53.12,-0.72 33.82,0.03C21.56,0.5 10.29,7.33 4.31,18.18C-2.89,31.28 -1.03,48.48 9.58,59.09L35.24,84.72L35.3,84.67L54.26,103.95C55.1,104.83 56.4,104.84 57.26,104.02L68.99,92.85C71.33,90.62 72.25,87.67 71.94,84.56Z"
15+
android:fillColor="#000000"/>
16+
<path
17+
android:pathData="M27.05,103.77C23.83,108.67 16.67,109.46 12.57,105.35L0.59,93.33C-0.16,92.47 -0.23,91.34 0.61,90.5L18.06,73.25L29.14,85.24L23.89,90.65C27.07,93.98 29.74,99.68 27.05,103.77Z"
18+
android:fillColor="#000000"/>
19+
<path
20+
android:pathData="M64.1,32.64C64.1,41.72 58.58,49.08 51.75,49.08C44.93,49.08 39.4,41.72 39.4,32.64C39.4,23.56 44.93,16.2 51.75,16.2C58.58,16.2 64.1,23.56 64.1,32.64Z"
21+
android:fillColor="#ffffff"/>
22+
<path
23+
android:pathData="M55.2,42.3C59.21,42.3 62.45,37.97 62.45,32.64C62.45,27.31 59.21,22.99 55.2,22.99C51.2,22.99 47.95,27.31 47.95,32.64C47.95,37.97 51.2,42.3 55.2,42.3Z"
24+
android:fillColor="#000000"/>
25+
<path
26+
android:pathData="M42.69,32.64C42.69,41.72 37.16,49.08 30.34,49.08C23.52,49.08 17.99,41.72 17.99,32.64C17.99,23.56 23.52,16.2 30.34,16.2C37.16,16.2 42.69,23.56 42.69,32.64Z"
27+
android:fillColor="#ffffff"/>
28+
<path
29+
android:pathData="M33.79,42.3C37.8,42.3 41.04,37.97 41.04,32.64C41.04,27.31 37.8,22.99 33.79,22.99C29.79,22.99 26.54,27.31 26.54,32.64C26.54,37.97 29.79,42.3 33.79,42.3Z"
30+
android:fillColor="#000000"/>
31+
</group>
32+
</group>
3033
</vector>
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@drawable/ic_launcher_background" />
4-
<foreground android:drawable="@drawable/ic_launcher_foreground" />
5-
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
6-
</adaptive-icon>
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
5+
</adaptive-icon>

app/src/main/res/mipmap-anydpi/ic_launcher_round.xml renamed to app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@drawable/ic_launcher_background" />
4-
<foreground android:drawable="@drawable/ic_launcher_foreground" />
5-
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
6-
</adaptive-icon>
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
5+
</adaptive-icon>
208 Bytes
Loading
558 Bytes
Loading
82 Bytes
Loading

0 commit comments

Comments
 (0)