package com.cooleshow.student.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.student.R;
import com.cooleshow.student.bean.AppHomeBean;

import java.util.List;

/**
 * 创建日期：2022/5/27 10:37
 *
 * @author Ryan
 * 类说明：
 */
public class HomeWonderfulInfoAdapter extends BaseQuickAdapter<AppHomeBean.ItemBean, BaseViewHolder> {

    public HomeWonderfulInfoAdapter(List<AppHomeBean.ItemBean> data) {
        super(R.layout.layout_home_wonderful_info_item, data);
    }


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

}
