Skip to content

Commit

Permalink
[MERGE] #223 -> develop
Browse files Browse the repository at this point in the history
[UI/#223] 온보딩 그래픽 추가
  • Loading branch information
boiledEgg-s authored Sep 8, 2024
2 parents 8ddef8b + 7768a33 commit 57a5058
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ package com.terning.core.designsystem.component.item
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.RectangleShape
import com.airbnb.lottie.compose.LottieAnimation
import com.airbnb.lottie.compose.LottieCompositionSpec
import com.airbnb.lottie.compose.rememberLottieComposition

@Composable
fun TerningLottieAnimation(
jsonString: String,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
iterations: Int = 1,
) {
val lottieComposition by rememberLottieComposition(LottieCompositionSpec.Asset(jsonString))
LottieAnimation(
modifier = modifier,
composition = lottieComposition
modifier = modifier.clip(RectangleShape),
composition = lottieComposition,
iterations = iterations,
clipToCompositionBounds = false
)
}
1 change: 1 addition & 0 deletions feature/src/main/assets/terning_onboarding_start.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.airbnb.lottie.compose.LottieConstants
import com.terning.core.designsystem.component.button.RectangleButton
import com.terning.core.designsystem.component.item.TerningLottieAnimation
import com.terning.core.designsystem.theme.TerningPointTheme
import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.designsystem.theme.White
Expand Down Expand Up @@ -79,16 +81,19 @@ fun StartFilteringScreen(
Text(
text = stringResource(id = R.string.start_filtering_title),
style = TerningTheme.typography.title1,
modifier = Modifier.padding(bottom = 35.dp),
modifier = Modifier.padding(bottom = 36.dp),
textAlign = TextAlign.Center
)
Image(
painter = painterResource(id = R.drawable.ic_terning_onboarding),

TerningLottieAnimation(
jsonString = "terning_onboarding_start.json",
iterations = LottieConstants.IterateForever,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp),
contentDescription = "terning image"
.height(372.dp)
.padding(horizontal = 24.dp)
)

Spacer(modifier = Modifier.weight(2f))
}
Box(
Expand Down

0 comments on commit 57a5058

Please sign in to comment.