package com.gingersoft.gsa.cloud.main.mvp.ui.adapter;

import android.graphics.drawable.Drawable;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.gingersoft.gsa.cloud.main.R;
import com.gingersoft.gsa.cloud.main.mvp.model.bean.ReportListItem;
import com.gingersoft.gsa.cloud.main.mvp.model.bean.ReportListItem;

import java.util.List;

public class ReportListAdapter extends BaseQuickAdapter<ReportListItem, BaseViewHolder> {

    public ReportListAdapter(@Nullable List<ReportListItem> data) {
        super(R.layout.item_main_report, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ReportListItem item) {
        TextView tv_report_item = helper.findView(R.id.tv_report_item);
        tv_report_item.setText(item.getReportName());
        tv_report_item.setCompoundDrawables(item.getReportDrawable(),null,null,null);
    }
}
