package com.yzx.escreen.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yzx.escreen.R
import com.yzx.escreen.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
    }
}