package com.cooleshow.teacher.adapter;

import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.cooleshow.base.utils.GlideUtils;
import com.cooleshow.teacher.R;
import com.cooleshow.teacher.bean.HomeMenuBean;

import java.util.List;

/**
 * 创建日期：2022/5/26 18:00
 *
 * @author Ryan
 * 类说明：
 */
public class HomeMenuItemAdapter extends BaseQuickAdapter<HomeMenuBean.ItemBean, BaseViewHolder> {

    public HomeMenuItemAdapter() {
        super(R.layout.layout_home_menu_item);
    }


    @Override
    protected void convert(BaseViewHolder helper, HomeMenuBean.ItemBean item) {
        ImageView im_pic = helper.getView(R.id.im_pic);
        TextView tv_title = helper.getView(R.id.tv_title);
        GlideUtils.INSTANCE.loadImage(getContext(), item.coverImage, im_pic);
        tv_title.setText(item.title);
    }
}
