package com.develop.main.init.ui.adapter

import android.widget.ImageView
import androidx.appcompat.widget.AppCompatTextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.develop.food.base.data.model.ModelsModel
import com.develop.main.R

class ModesGridAdapter : BaseQuickAdapter<ModelsModel, BaseViewHolder>(R.layout.item_grid_view) {
    override fun convert(holder: BaseViewHolder, item: ModelsModel) {
        holder.getView<ImageView>(R.id.iv_icon).setBackgroundResource(item.resId)
        holder.getView<AppCompatTextView>(R.id.tv_mode_name).text = item.modeName
    }
}