package com.unis.sxzcl.ui.depot;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.unis.model.bean.DepotBean;
import com.unis.sxzcl.R;

import org.jetbrains.annotations.NotNull;

/**
 * 包名: com.unis.sxzcl.ui.depot
 * 类名: DepotListAdapter
 * 作用描述:
 * 创建人: mQ
 * 创建时间: 2020/11/26 9:39
 * 更新人:
 * 更新时间: 2020/11/26 9:39
 * 更新说明:
 * 版本号: 1.0
 */
public class DepotListAdapter extends BaseQuickAdapter<DepotBean, BaseViewHolder> implements LoadMoreModule {

    public DepotListAdapter() {
        super(R.layout.item_list_depot);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, DepotBean item) {
        Glide.with(getContext())
//                        .load(item.icon)
                .load(R.mipmap.ic_launcher)
                .placeholder(R.drawable.ic_img_loading)
                .error(R.drawable.no_banner)
                .into((ImageView) holder.getView(R.id.iv_show));
        holder.setText(R.id.tv_title, item.name);
    }
}
