package com.tenlionsoft.oamodule.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
import com.tenlionsoft.oamodule.R;
import com.tenlionsoft.oamodule.beans.DocumentListBean;
import com.tenlionsoft.oamodule.holder.FileHolder;

import java.util.List;

/**
 * 作者: adam
 * 日期: 2022/4/12 - 10:42 上午
 * 邮箱: itgaojian@163.com
 * 描述:
 */
public class DocumentAdapter extends BaseRecyclerAdapter<DocumentListBean.RowsBean, FileHolder> {
    public DocumentAdapter(Context ctx, List<DocumentListBean.RowsBean> list) {
        super(ctx, list);
    }

    @Override
    public FileHolder createHolder(ViewGroup parent, int viewType) {
        View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_document, parent, false);
        return new FileHolder(itemView);
    }

    @Override
    public void bindHolder(FileHolder fileHolder, int i) {
        fileHolder.mTvName.setText(mData.get(i).getContent());
    }
}
