package com.yzx.ebrand.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yzx.ebrand.R
import com.yzx.ebrand.model.HomeItem
import kotlinx.android.synthetic.main.item_home.view.*

class HomeAdapter(list: MutableList<HomeItem>) : BaseQuickAdapter<HomeItem, BaseViewHolder>(R.layout.item_home,list) {
    override fun convert(holder: BaseViewHolder, item: HomeItem) {
        holder.itemView.img.setImageResource(item.img)
        holder.itemView.name.text = item.title
    }
}