|
|
@@ -40,7 +40,7 @@ class RankTagViewHolder :
|
|
|
holder.binding.ivBg.setImageResource(
|
|
|
getRankTagResId(
|
|
|
item.rankInfo.rankBoardType,
|
|
|
- item.rankInfo.rank
|
|
|
+ item.rankInfo.cycleType
|
|
|
)
|
|
|
)
|
|
|
holder.binding.tvContent.apply {
|
|
|
@@ -63,28 +63,38 @@ class RankTagViewHolder :
|
|
|
}
|
|
|
|
|
|
companion object {
|
|
|
- fun getRankTagResId(rankBoardType: Int, rank: Int): Int {
|
|
|
+ /**
|
|
|
+ * cycleType=1 日榜
|
|
|
+ * cycleType=2 周榜
|
|
|
+ * cycleType=3 月榜
|
|
|
+ */
|
|
|
+ fun getRankTagResId(rankBoardType: Int, cycleType: Int): Int {
|
|
|
return when (rankBoardType) {
|
|
|
RANK_CHARM -> {
|
|
|
- when (rank) {
|
|
|
- 1 -> R.drawable.charm_label_top1
|
|
|
+ when (cycleType) {
|
|
|
+ 3 -> R.drawable.charm_label_top1
|
|
|
2 -> R.drawable.charm_label_top2
|
|
|
- else -> R.drawable.charm_label_top3
|
|
|
+ 1 -> R.drawable.charm_label_top3
|
|
|
+ else -> -1
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
RANK_WEALTH -> {
|
|
|
- when (rank) {
|
|
|
- 1 -> R.drawable.wealth_label_top1
|
|
|
+ when (cycleType) {
|
|
|
+ 3 -> R.drawable.wealth_label_top1
|
|
|
2 -> R.drawable.wealth_label_top2
|
|
|
- else -> R.drawable.wealth_label_top3
|
|
|
+ 1 -> R.drawable.wealth_label_top3
|
|
|
+ else -> -1
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
else -> {
|
|
|
- when (rank) {
|
|
|
- 1 -> R.drawable.room_label_top1
|
|
|
+ when (cycleType) {
|
|
|
+ 3 -> R.drawable.room_label_top1
|
|
|
2 -> R.drawable.room_label_top2
|
|
|
- else -> R.drawable.room_label_top3
|
|
|
+ 1 -> R.drawable.room_label_top3
|
|
|
+ else -> -1
|
|
|
}
|
|
|
}
|
|
|
}
|