bug修复 - 宝箱任务 图标问题
This commit is contained in:
parent
7b73b833c6
commit
e030324b5d
|
|
@ -48,7 +48,22 @@ class BenefitTaskItemView @JvmOverloads constructor(
|
|||
val finishNum = if (subTaskState.finishedNum > subTaskState.required_count) subTaskState.required_count else subTaskState.finishedNum
|
||||
val progressNum: Int = finishNum * 100 / subTaskState.required_count
|
||||
|
||||
//ivItemIcon.setImageResource(R.mipmap.icon_cash_s)
|
||||
var iconRes = R.mipmap.icon_video_task
|
||||
when(subTaskState.task_type) {
|
||||
1 -> { // ad
|
||||
iconRes = R.mipmap.icon_ad
|
||||
}
|
||||
2-> { // video
|
||||
iconRes = R.mipmap.icon_video_task
|
||||
}
|
||||
3 -> { // sign
|
||||
iconRes = R.mipmap.icon_calendar
|
||||
}
|
||||
4-> { // zeroBuy
|
||||
iconRes = R.mipmap.task_act_convi
|
||||
}
|
||||
}
|
||||
ivItemIcon.setImageResource(iconRes)
|
||||
tvItemTitle.setText(TaskManager.instance().boxTaskStatus().getSubTaskHintStrRes(boxIndex, subTaskIndex))
|
||||
progressBar.setProgress(progressNum)
|
||||
tvProgressInfo.text = "($finishNum/${subTaskState.required_count})"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
android:id="@+id/iv_item_icon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_video_task"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
|
|
|
|||
Loading…
Reference in New Issue