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 on StickyHeaderDecoration
    • 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 holder
        position - the header's item position