diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
index 0c0c33838..e76ed3f3c 100644
--- a/.idea/deploymentTargetDropDown.xml
+++ b/.idea/deploymentTargetDropDown.xml
@@ -3,7 +3,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 000000000..b6a52692f
Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
index 07d5da9cb..ca3826a46 100644
--- a/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 56%
rename from app/src/main/res/mipmap-anydpi/ic_launcher.xml
rename to app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 6f3b755bf..c4a603d4c 100644
--- a/app/src/main/res/mipmap-anydpi/ic_launcher.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 56%
rename from app/src/main/res/mipmap-anydpi/ic_launcher_round.xml
rename to app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index 6f3b755bf..c4a603d4c 100644
--- a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
index c209e78ec..e060f1c4e 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 000000000..14899e84c
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
index b2dfe3d1b..8e82cb0d2 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
index 4f0f1d64e..a34418d04 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 000000000..a3c069e7f
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
index 62b611da0..244936489 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
index 948a3070f..f6cc81192 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 000000000..7d36d0f35
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
index 1b9a6956b..03f2913d5 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
index 28d4b77f9..e053305a8 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 000000000..d238d0ccc
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
index 9287f5083..9edf632f9 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
index aa7d6427e..b71ca9092 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 000000000..ea4e5e26b
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
index 9126ae37c..79f87fe72 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/feature/splash/src/main/java/com/wap/wapp/feature/splash/SplahScreen.kt b/feature/splash/src/main/java/com/wap/wapp/feature/splash/SplahScreen.kt
index a6cd4c6de..cecf83ca3 100644
--- a/feature/splash/src/main/java/com/wap/wapp/feature/splash/SplahScreen.kt
+++ b/feature/splash/src/main/java/com/wap/wapp/feature/splash/SplahScreen.kt
@@ -1,19 +1,40 @@
package com.wap.wapp.feature.splash
import android.app.Activity
+import androidx.compose.animation.AnimatedContent
+import androidx.compose.animation.core.animateDpAsState
+import androidx.compose.animation.core.tween
+import androidx.compose.animation.scaleIn
+import androidx.compose.animation.scaleOut
+import androidx.compose.animation.togetherWith
+import androidx.compose.foundation.Image
import androidx.compose.foundation.background
-import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
+import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.wap.designsystem.WappTheme
import com.wap.wapp.core.commmon.extensions.showToast
import com.wap.wapp.core.commmon.extensions.toSupportingText
+import com.wap.wapp.core.designresource.R
+import com.wap.wapp.feature.splash.R.string
@Composable
internal fun SplashRoute(
@@ -22,6 +43,8 @@ internal fun SplashRoute(
navigateToNotice: () -> Unit,
) {
val context = LocalContext.current as Activity
+ val isIconLogoVisible by viewModel.isIconLogoVisible.collectAsStateWithLifecycle()
+ val isIconLogoGoUp by viewModel.isIconLogoGoUp.collectAsStateWithLifecycle()
LaunchedEffect(true) {
viewModel.splashUiEvent.collect { event ->
@@ -35,20 +58,100 @@ internal fun SplashRoute(
}
}
}
- SplashScreen()
+ SplashScreen(
+ isIconLogoVisible = isIconLogoVisible,
+ isIconLogoGoUp = isIconLogoGoUp,
+ )
}
@Composable
-internal fun SplashScreen() {
- Box(
+internal fun SplashScreen(
+ isIconLogoVisible: Boolean,
+ isIconLogoGoUp: Boolean,
+) {
+ val ANIMATION_MILLS = 400
+
+ Column(
modifier = Modifier
.fillMaxSize()
.background(WappTheme.colors.backgroundBlack),
) {
- Text(
- text = "splash",
- modifier = Modifier.align(Alignment.Center),
- color = WappTheme.colors.white,
+ AnimatedContent(
+ targetState = isIconLogoVisible,
+ transitionSpec = {
+ scaleIn(tween(ANIMATION_MILLS, ANIMATION_MILLS)) togetherWith
+ scaleOut(tween(ANIMATION_MILLS))
+ },
+ ) { isIconLogoVisible ->
+ if (!isIconLogoVisible) {
+ SplashTypoLogo()
+ } else {
+ SplashIconLogo(isIconLogoGoUp)
+ }
+ }
+ }
+}
+
+@Composable
+private fun SplashTypoLogo() {
+ Column(
+ verticalArrangement = Arrangement.Center,
+ modifier = Modifier
+ .fillMaxSize(),
+ ) {
+ Image(
+ painter = painterResource(id = com.wap.wapp.feature.splash.R.drawable.ic_wapp_logo),
+ modifier = Modifier
+ .align(Alignment.CenterHorizontally)
+ .size(width = 230.dp, height = 230.dp),
+ contentDescription = stringResource(id = string.wapp_icon_description),
)
}
}
+
+@Composable
+private fun SplashIconLogo(isIconLogoGoUp: Boolean) {
+ val animatedPadding by animateDpAsState(
+ targetValue = if (isIconLogoGoUp) 200.dp else 0.dp,
+ animationSpec = tween(1000),
+ )
+
+ Column(modifier = Modifier.fillMaxSize()) {
+ Column(
+ verticalArrangement = Arrangement.Center,
+ modifier = Modifier
+ .fillMaxSize()
+ .weight(1f)
+ .padding(bottom = animatedPadding),
+ ) {
+ Image(
+ painter = painterResource(id = R.drawable.img_white_cat),
+ modifier = Modifier
+ .align(Alignment.CenterHorizontally)
+ .size(width = 230.dp, height = 230.dp),
+ contentDescription = stringResource(id = string.wapp_icon_description),
+ )
+
+ Row(
+ modifier = Modifier.align(Alignment.CenterHorizontally),
+ ) {
+ Column {
+ Spacer(modifier = Modifier.height(40.dp))
+
+ Text(
+ text = stringResource(id = string.application_name),
+ style = WappTheme.typography.titleBold,
+ fontSize = 48.sp,
+ color = WappTheme.colors.white,
+ )
+ }
+ Text(
+ text = stringResource(id = string.application_name),
+ fontSize = 48.sp,
+ style = WappTheme.typography.titleBold,
+ color = WappTheme.colors.yellow34,
+ )
+ }
+ }
+ }
+}
diff --git a/feature/splash/src/main/java/com/wap/wapp/feature/splash/SplashViewModel.kt b/feature/splash/src/main/java/com/wap/wapp/feature/splash/SplashViewModel.kt
index e07ca7ea1..2a14d9c2a 100644
--- a/feature/splash/src/main/java/com/wap/wapp/feature/splash/SplashViewModel.kt
+++ b/feature/splash/src/main/java/com/wap/wapp/feature/splash/SplashViewModel.kt
@@ -6,7 +6,9 @@ import com.wap.wapp.core.domain.usecase.auth.IsUserSignInUseCase
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableSharedFlow
+import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asSharedFlow
+import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.launch
import javax.inject.Inject
@@ -17,9 +19,17 @@ class SplashViewModel @Inject constructor(
private val _splashUiEvent = MutableSharedFlow()
val splashUiEvent = _splashUiEvent.asSharedFlow()
+ private var _isIconLogoVisible = MutableStateFlow(false)
+ var isIconLogoVisible = _isIconLogoVisible.asStateFlow()
+
+ private var _isIconLogoGoUp = MutableStateFlow(false)
+ var isIconLogoGoUp = _isIconLogoGoUp.asStateFlow()
+
init {
viewModelScope.launch {
- delay(2000)
+ delay(1500)
+ _isIconLogoVisible.value = true
+ delay(1000)
isUserSignIn()
}
}
@@ -30,6 +40,8 @@ class SplashViewModel @Inject constructor(
if (isSignIn) {
_splashUiEvent.emit(SplashEvent.SignInUser)
} else {
+ _isIconLogoGoUp.value = true
+ delay(1000)
_splashUiEvent.emit(SplashEvent.NonSignInUser)
}
}.onFailure { throwable ->
diff --git a/feature/splash/src/main/res/drawable/ic_splash_logo.png b/feature/splash/src/main/res/drawable/ic_splash_logo.png
new file mode 100644
index 000000000..a02b63cd9
Binary files /dev/null and b/feature/splash/src/main/res/drawable/ic_splash_logo.png differ
diff --git a/feature/splash/src/main/res/drawable/ic_wapp_logo.png b/feature/splash/src/main/res/drawable/ic_wapp_logo.png
new file mode 100644
index 000000000..01b140fa7
Binary files /dev/null and b/feature/splash/src/main/res/drawable/ic_wapp_logo.png differ
diff --git a/feature/splash/src/main/res/values/strings.xml b/feature/splash/src/main/res/values/strings.xml
index 6048840ea..bdedd8ee6 100644
--- a/feature/splash/src/main/res/values/strings.xml
+++ b/feature/splash/src/main/res/values/strings.xml
@@ -1,4 +1,5 @@
-
- Hello blank fragment
-
\ No newline at end of file
+ WAPP
+ WAPP Icon
+ WAPP ICON
+