package com.cooleshow.student.adapter;

import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.cooleshow.base.utils.GlideUtils;
import com.cooleshow.base.utils.SizeUtils;
import com.cooleshow.base.utils.UiUtils;
import com.cooleshow.base.widgets.QMUIRadiusImageView;
import com.cooleshow.student.R;
import com.cooleshow.student.bean.HomeLiveAndVideoBean;

import java.util.List;

/**
 * 创建日期：2022/5/27 14:51
 *
 * @author Ryan
 * 类说明：
 */
public class NewHomeVideoCourseAdapter extends BaseQuickAdapter<HomeLiveAndVideoBean.VideoCourseBean, BaseViewHolder> {

    public NewHomeVideoCourseAdapter() {
        super(R.layout.item_home_video_list_layout);
    }

    @Override
    protected void convert(BaseViewHolder helper, HomeLiveAndVideoBean.VideoCourseBean item) {
        ImageView iv_cover = helper.getView(R.id.iv_cover);
        GlideUtils.INSTANCE.loadTopRoundImage(getContext(), item.lessonCoverUrl, iv_cover, 10, com.cooleshow.base.R.drawable.bg_video_placeholder);

        helper.setText(R.id.subject_name, item.subjectName);
        TextView tv_title = helper.getView(R.id.tv_title);
        tv_title.setText(item.videoGroupName);
        TextView tv_teacher_name = helper.getView(R.id.tv_name);
        tv_teacher_name.setText(item.teacherName);
        helper.setText(R.id.tv_tip, item.buyCount + "人在学");
    }
}
