Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QA] 스플래쉬 UI 수정 #100

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/src/main/java/com/moya/funch/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.activity.compose.setContent
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import com.moya.funch.datastore.UserDataStore
Expand All @@ -28,7 +28,7 @@ class MainActivity : ComponentActivity() {
installSplashScreen()
setContent {
FunchTheme {
var showLoading by remember { mutableStateOf(true) }
var showLoading by rememberSaveable { mutableStateOf(true) }

LaunchedEffect(Unit) {
delay(1500)
Expand Down
23 changes: 7 additions & 16 deletions app/src/main/java/com/moya/funch/splash/SplashScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.moya.funch.splash

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
Expand All @@ -19,7 +18,6 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.airbnb.lottie.compose.LottieAnimation
import com.airbnb.lottie.compose.LottieCompositionSpec
import com.airbnb.lottie.compose.LottieConstants
import com.airbnb.lottie.compose.rememberLottieComposition
import com.moya.funch.R
import com.moya.funch.theme.FunchTheme
Expand All @@ -42,28 +40,21 @@ fun LoadingScreen() {
Surface(
color = FunchTheme.colors.background
) {
Column(
Box(
modifier = Modifier
.fillMaxSize()
.fillMaxSize(),
contentAlignment = Alignment.Center
) {
LottieAnimation(
composition = splashIcon,
iterations = LottieConstants.IterateForever
composition = splashBackground,
iterations = 1
)
LottieAnimation(
composition = splashBackground,
iterations = LottieConstants.IterateForever
composition = splashIcon,
iterations = 1
)
}

Box(
modifier = Modifier
.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Image(painter = painterResource(id = R.drawable.ic_splash_logo), contentDescription = "Splash Logo")
}

Box(
modifier = Modifier
.fillMaxSize(),
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/raw/funch_splash_icon_lottie.json

Large diffs are not rendered by default.

Loading