Interface StickyHeaderAdapter<T extends androidx.recyclerview.widget.RecyclerView.ViewHolder>
-
- Type Parameters:
T- the header view holder
public interface StickyHeaderAdapter<T extends androidx.recyclerview.widget.RecyclerView.ViewHolder>Adapter to be used onStickyHeaderDecoration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetHeaderId(int position)Returns the header id for the item at the given position.voidonBindHeaderViewHolder(T viewholder, int position)Updates the header view to reflect the header data for the given positionTonCreateHeaderViewHolder(android.view.ViewGroup parent)Creates a new header ViewHolder.
-
-
-
Method Detail
-
getHeaderId
long getHeaderId(int position)
Returns the header id for the item at the given position.- Parameters:
position- the item position- Returns:
- the header id
-
onCreateHeaderViewHolder
T onCreateHeaderViewHolder(android.view.ViewGroup parent)
Creates a new header ViewHolder.- Parameters:
parent- the header's view parent- Returns:
- a view holder for the created view
-
onBindHeaderViewHolder
void onBindHeaderViewHolder(T viewholder, int position)
Updates the header view to reflect the header data for the given position- Parameters:
viewholder- the header view holderposition- the header's item position
-
-