package com.common.lib_base.base.adapter;

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

/**
 * Date: 2022/5/26 0026 13:57
 * Description:
 */
public abstract class BaseViewHolder<T> {
    /**
     * 1.布局文件 convertView
     * 2.holder 绑定
     * 3.数据mData
     */
    public View convertView;
    public T mData;
    public Context context;


    public BaseViewHolder() {
        convertView = initView();
        convertView.setTag(this);//绑定tag
    }

    public void setData(T dada) {
        this.mData = dada;
        refreshView();
    }

    public abstract void refreshView();//数据设置

    public abstract View initView();
}
