package com.wd.workoffice.ui.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.ImageBean;

import java.util.List;

import androidx.annotation.Nullable;

/**
 * Created by flexible on 2018/8/13.
 */

public class AnnexAdapter extends BaseQuickAdapter<ImageBean, BaseViewHolder> {
    int type = 0;

    public AnnexAdapter(int layoutResId, List data) {
        super(layoutResId, data);
    }

    public AnnexAdapter(int layoutResId, @Nullable List<ImageBean> data, int type) {
        super(layoutResId, data);
        this.type = type;
    }

    @Override
    protected void convert(BaseViewHolder helper, ImageBean item) {
        helper.setText(R.id.tv_name, item.getName());
        helper.addOnClickListener(R.id.tv_delete);
        helper.setGone(R.id.tv_delete, type == 0);
    }
}

