public class HeaderFooterRecyclerView.RecyclerWrapAdapter
extends androidx.recyclerview.widget.RecyclerView.Adapter
构造器和说明 |
---|
RecyclerWrapAdapter(java.util.ArrayList<android.view.View> mHeaderViews,
java.util.ArrayList<android.view.View> mFooterViews,
androidx.recyclerview.widget.RecyclerView.Adapter mAdapter) |
限定符和类型 | 方法和说明 |
---|---|
int |
getFootersCount() |
int |
getHeadersCount() |
int |
getItemCount() |
long |
getItemId(int position) |
int |
getItemViewType(int position) |
boolean |
isFooter(int position) |
boolean |
isHeader(int position) |
void |
onAttachedToRecyclerView(androidx.recyclerview.widget.RecyclerView recyclerView)
将Header、Footer挂靠到RecyclerView
|
void |
onBindViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder holder,
int position) |
void |
onBindViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder holder,
int position,
java.util.List payloads) |
androidx.recyclerview.widget.RecyclerView.ViewHolder |
onCreateViewHolder(android.view.ViewGroup parent,
int viewType) |
bindViewHolder, createViewHolder, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver
public RecyclerWrapAdapter(java.util.ArrayList<android.view.View> mHeaderViews, java.util.ArrayList<android.view.View> mFooterViews, androidx.recyclerview.widget.RecyclerView.Adapter mAdapter)
public int getHeadersCount()
public int getFootersCount()
public androidx.recyclerview.widget.RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType)
onCreateViewHolder
在类中 androidx.recyclerview.widget.RecyclerView.Adapter
public void onBindViewHolder(@NonNull androidx.recyclerview.widget.RecyclerView.ViewHolder holder, int position, @NonNull java.util.List payloads)
onBindViewHolder
在类中 androidx.recyclerview.widget.RecyclerView.Adapter
public void onBindViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder holder, int position)
onBindViewHolder
在类中 androidx.recyclerview.widget.RecyclerView.Adapter
public void onAttachedToRecyclerView(androidx.recyclerview.widget.RecyclerView recyclerView)
onAttachedToRecyclerView
在类中 androidx.recyclerview.widget.RecyclerView.Adapter
recyclerView
- public boolean isHeader(int position)
public boolean isFooter(int position)
public int getItemCount()
getItemCount
在类中 androidx.recyclerview.widget.RecyclerView.Adapter
public int getItemViewType(int position)
getItemViewType
在类中 androidx.recyclerview.widget.RecyclerView.Adapter
public long getItemId(int position)
getItemId
在类中 androidx.recyclerview.widget.RecyclerView.Adapter