Skip to content

Commit

Permalink
[fix] Rule Guide Lottie 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
murjune committed Feb 10, 2024
1 parent d546317 commit af07229
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
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 hous.release.android.R
import hous.release.designsystem.theme.HousTheme

@Composable
fun RuleGuideLottie(
idx: Int
) {
val composition by rememberLottieComposition(
LottieCompositionSpec.RawRes(
provideRuleGuideLottie(
0 // TODO : lottie json 파일 다시 받으면 idx로 바꾸기
)
provideRuleGuideLottie(idx)
)
)

Expand All @@ -46,3 +46,11 @@ private fun provideRuleGuideLottie(idx: Int): Int {
else -> throw IllegalArgumentException("Invalid Index: $idx")
}
}

@Composable
@Preview(showBackground = true)
private fun RuleGuideBottomSheetContentPreview() {
HousTheme {
RuleGuideBottomSheetContent()
}
}
2 changes: 1 addition & 1 deletion app/src/main/res/raw/rule_guide_2.json

Large diffs are not rendered by default.

Loading

0 comments on commit af07229

Please sign in to comment.