public class SectionedRecyclerViewAdapter extends RecyclerView.Adapter implements HeaderItemDecoration.HeaderItemDecorationListener
| Constructor and Description |
|---|
SectionedRecyclerViewAdapter(RecyclerView recyclerView) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSection(RecyclerViewAdapterSection section) |
void |
bindHeaderData(android.view.View header,
int headerPosition) |
void |
clear() |
void |
dataSetChanged() |
int |
getHeaderLayout(int headerPosition) |
int |
getItemCount() |
int |
getItemViewType(int position) |
boolean |
hasHeader(int section) |
boolean |
isLastOfSection(int position,
int section) |
boolean |
isStickHeader() |
void |
onBindViewHolder(RecyclerView.ViewHolder holder,
int position) |
RecyclerView.ViewHolder |
onCreateViewHolder(android.view.ViewGroup parent,
int viewType) |
void |
removeSection(RecyclerViewAdapterSection section) |
void |
setStickHeader(boolean stickHeader) |
public SectionedRecyclerViewAdapter(RecyclerView recyclerView)
public boolean isStickHeader()
isStickHeader in interface HeaderItemDecoration.HeaderItemDecorationListenerpublic void setStickHeader(boolean stickHeader)
public void addSection(RecyclerViewAdapterSection section)
public void removeSection(RecyclerViewAdapterSection section)
public void clear()
public void dataSetChanged()
public final int getItemViewType(int position)
public final RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent,
int viewType)
public final void onBindViewHolder(RecyclerView.ViewHolder holder,
int position)
public final int getItemCount()
public int getHeaderLayout(int headerPosition)
getHeaderLayout in interface HeaderItemDecoration.HeaderItemDecorationListenerpublic void bindHeaderData(android.view.View header,
int headerPosition)
bindHeaderData in interface HeaderItemDecoration.HeaderItemDecorationListenerpublic boolean hasHeader(int section)
hasHeader in interface HeaderItemDecoration.HeaderItemDecorationListenerpublic boolean isLastOfSection(int position,
int section)
isLastOfSection in interface HeaderItemDecoration.HeaderItemDecorationListener