public class FeatureSectionAdapter
extends androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
Modifier and Type | Class and Description |
---|---|
static class |
FeatureSectionAdapter.Section |
static class |
FeatureSectionAdapter.SectionViewHolder |
Constructor and Description |
---|
FeatureSectionAdapter(Context ctx,
int sectionResourceId,
int textResourceId,
androidx.recyclerview.widget.RecyclerView.Adapter baseAdapter) |
Modifier and Type | Method and Description |
---|---|
int |
getConvertedPosition(int sectionedPosition) |
int |
getItemCount() |
long |
getItemId(int position) |
int |
getItemViewType(int position) |
boolean |
isSectionHeaderPosition(int position) |
void |
onBindViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder sectionViewHolder,
int position) |
androidx.recyclerview.widget.RecyclerView.ViewHolder |
onCreateViewHolder(ViewGroup parent,
int typeView) |
void |
setSections(FeatureSectionAdapter.Section[] sections) |
bindViewHolder, createViewHolder, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver
public FeatureSectionAdapter(Context ctx, int sectionResourceId, int textResourceId, androidx.recyclerview.widget.RecyclerView.Adapter baseAdapter)
public androidx.recyclerview.widget.RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int typeView)
onCreateViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
public void onBindViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder sectionViewHolder, int position)
onBindViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
public int getItemViewType(int position)
getItemViewType
in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
public void setSections(FeatureSectionAdapter.Section[] sections)
public int getConvertedPosition(int sectionedPosition)
public boolean isSectionHeaderPosition(int position)
public long getItemId(int position)
getItemId
in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
public int getItemCount()
getItemCount
in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>