estoy intentando agregar un setBackgroundResource si el task.status es igual a 3 y position igual a 0 pero no se como
no puedo agregar la taskList[position] igual a 0 y task.status = 3 y cambie el color
setBackgroundResource
class TaskAdapter(
private var taskStatus: Task,
private val context: Context,
private val taskList: List,
val taskSelected: (Task, Int) -> Unit,
) : RecyclerView.Adapter() {
companion object {
val SELECT_BACK: Int = 1
val SELECT_REMOVE: Int = 2
val SELECT_EDIT: Int = 3
val SELECT_DETAILS: Int = 4
val SELECT_NEXT: Int = 5
}
override fun onCreateViewHolder(parent:...