import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; import java.util.List; public abstract class BaseRecyclerAdapter<T> extends RecyclerView.Adapter<ViewHolder> { protected List<T> list; private int layoutId; protected Context mContext; public AdapterRefresh adapterRefresh; public BaseRecyclerAdapter(int layoutId, Context context) { this.layoutId = layoutId; this.mContext = context; list = new ArrayList<>(); } public BaseRecyclerAdapter(List<T> list, int layoutId, Context context) { this.list = list; if (list == null) this.list = new ArrayList<>(); this.layoutId = layoutId; this.mContext = context; } /** * ItemClick的回调接口 * * @author zhy
Android 自定义BaseRecyclerView.Adapter
最新推荐文章于 2024-07-11 00:48:06 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)