package com.abbidot.tracker.adapter

import android.content.Context
import com.abbidot.baselibrary.list.BaseRecyclerAdapter
import com.abbidot.baselibrary.list.RecyclerViewHolder
import com.abbidot.tracker.R
import com.qmuiteam.qmui.widget.QMUIRadiusImageView

/**
 *Created  by .yzq on 2021/12/30/030.
 * @link
 * @description:LedLight默认可以选择颜色适配器
 */
class LedLightColorAdapter(ctx: Context, list: MutableList<Int>?) :
    BaseRecyclerAdapter<Int>(ctx, list) {
    override fun getEmptyLayoutId(viewType: Int) = 0

    override fun getItemLayoutId(viewType: Int) = R.layout.item_led_color_select

    override fun bindData(holder: RecyclerViewHolder?, position: Int, item: Int) {
        val radiusImageView =
            holder!!.itemView.findViewById<QMUIRadiusImageView>(R.id.show_current_color_select)
        radiusImageView.setImageResource(item)
    }
}