package com.develop.step.details

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.develop.food.base.utils.loadCrossFade
import com.develop.step.R

class CookDetailToolAdapter: BaseQuickAdapter<CookToolItem, BaseViewHolder>(
    R.layout.item_cook_tool
) {
    override fun convert(holder: BaseViewHolder, item: CookToolItem) {
        holder.setText(R.id.tv_tool_name, item.text)
        val ivImage = holder.getView<ImageView>(R.id.iv_tool_icon)
        ivImage.loadCrossFade(item.icon)
    }
}