Skip to content

Commit

Permalink
Merge branch 'feat/usage_statics_ui' into feat/mypage_ui
Browse files Browse the repository at this point in the history
  • Loading branch information
jihyun0v0 authored Mar 30, 2024
2 parents eb5440f + 3035205 commit 975875c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class UsageStaticsTotalViewHolder(
}
}

fun bindBlackHoleInfo(usageStaticsModel: UsageStaticsModel) {
private fun bindBlackHoleInfo(usageStaticsModel: UsageStaticsModel) {
val blackHoleInfo =
BlackHoleInfo.createByLevel(usageStaticsModel.usageStatusAndGoal.blackHoleLevel)
?: BlackHoleInfo.LEVEL0
Expand All @@ -59,21 +59,15 @@ class UsageStaticsTotalViewHolder(
}

enum class BlackHoleInfo(val level: Int, val lottieFile: Int, val description: Int) {
LEVEL0(0, R.raw.lottie_blackhole0, R.string.blackhole0), LEVEL1(
1,
R.raw.lottie_blackhole1,
R.string.blackhole1
),
LEVEL0(0, R.raw.lottie_blackhole0, R.string.blackhole0),
LEVEL1(1, R.raw.lottie_blackhole1, R.string.blackhole1),
LEVEL2(2, R.raw.lottie_blackhole2, R.string.blackhole2), LEVEL3(
3,
R.raw.lottie_blackhole3,
R.string.blackhole3
),
LEVEL4(4, R.raw.lottie_blackhole4, R.string.blackhole4), LEVEL5(
5,
R.raw.lottie_blackhole5,
R.string.blackhole5
);
LEVEL4(4, R.raw.lottie_blackhole4, R.string.blackhole4),
LEVEL5(5, R.raw.lottie_blackhole5, R.string.blackhole5);

companion object {
fun createByLevel(level: Int): BlackHoleInfo? {
Expand Down
2 changes: 2 additions & 0 deletions feature/main/src/main/res/layout/item_usagestatic_total.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
app:layout_constraintDimensionRatio="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/lottie_blackhole0" />

<TextView
Expand Down

0 comments on commit 975875c

Please sign in to comment.