package com.dayu.qiheonlinelibrary.adapter; 
 | 
  
 | 
import android.view.ViewGroup; 
 | 
  
 | 
import androidx.annotation.NonNull; 
 | 
import androidx.recyclerview.widget.RecyclerView; 
 | 
  
 | 
import com.dayu.baselibrary.databinding.ItemNoMoreBinding; 
 | 
  
 | 
  
 | 
/** 
 | 
 * Copyright (C), 2023, 
 | 
 * Author: zuo 
 | 
 * Date: 2023-04-20 8:48 
 | 
 * Description: 
 | 
 */ 
 | 
public class BaseRecyclerAdapter<T extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<T> { 
 | 
  
 | 
    /** 
 | 
     * viewType--分别为item以及空view 
 | 
     */ 
 | 
    public static final int VIEW_TYPE_ITEM = 1; 
 | 
    public static final int VIEW_TYPE_EMPTY = 0; 
 | 
  
 | 
    public int myiewType; 
 | 
  
 | 
  
 | 
    @NonNull 
 | 
    @Override 
 | 
    public T onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 
 | 
        return null; 
 | 
    } 
 | 
  
 | 
    @Override 
 | 
    public void onBindViewHolder(@NonNull T holder, int position) { 
 | 
  
 | 
    } 
 | 
  
 | 
    @Override 
 | 
    public int getItemCount() { 
 | 
        return 0; 
 | 
    } 
 | 
  
 | 
  
 | 
  
 | 
  
 | 
    static class ViewHolderEmpty extends RecyclerView.ViewHolder { 
 | 
        ItemNoMoreBinding mBinding; 
 | 
        public ItemNoMoreBinding getBinding() { 
 | 
            return mBinding; 
 | 
        } 
 | 
  
 | 
        public void setBinding(ItemNoMoreBinding binding) { 
 | 
            this.mBinding = binding; 
 | 
        } 
 | 
  
 | 
        public ViewHolderEmpty(ItemNoMoreBinding itemView) { 
 | 
            super(itemView.getRoot()); 
 | 
            this.mBinding = itemView; 
 | 
  
 | 
        } 
 | 
    } 
 | 
  
 | 
  
 | 
} 
 |