Class EntrantHistoryAdapter

java.lang.Object
androidx.recyclerview.widget.RecyclerView.Adapter<com.example.lottery.adapter.EntrantHistoryAdapter.ViewHolder>
com.example.lottery.adapter.EntrantHistoryAdapter

public class EntrantHistoryAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<com.example.lottery.adapter.EntrantHistoryAdapter.ViewHolder>
Adapter for displaying the entrant's event registration history.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Data class that pairs an Event with the entrant's registration status and the organizer's display name.
    static interface 
    Listener interface for handling clicks on history items.

    Nested classes/interfaces inherited from class androidx.recyclerview.widget.RecyclerView.Adapter

    androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new EntrantHistoryAdapter.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    void
    onBindViewHolder(com.example.lottery.adapter.EntrantHistoryAdapter.ViewHolder holder, int position)
     
    com.example.lottery.adapter.EntrantHistoryAdapter.ViewHolder
    onCreateViewHolder(android.view.ViewGroup parent, int viewType)
     

    Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter

    bindViewHolder, createViewHolder, findRelativeAdapterPositionIn, getItemId, getItemViewType, getStateRestorationPolicy, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, setStateRestorationPolicy, unregisterAdapterDataObserver

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • onCreateViewHolder

      @NonNull public com.example.lottery.adapter.EntrantHistoryAdapter.ViewHolder onCreateViewHolder(@NonNull android.view.ViewGroup parent, int viewType)
      Specified by:
      onCreateViewHolder in class androidx.recyclerview.widget.RecyclerView.Adapter<com.example.lottery.adapter.EntrantHistoryAdapter.ViewHolder>
    • onBindViewHolder

      public void onBindViewHolder(@NonNull com.example.lottery.adapter.EntrantHistoryAdapter.ViewHolder holder, int position)
      Specified by:
      onBindViewHolder in class androidx.recyclerview.widget.RecyclerView.Adapter<com.example.lottery.adapter.EntrantHistoryAdapter.ViewHolder>
    • getItemCount

      public int getItemCount()
      Specified by:
      getItemCount in class androidx.recyclerview.widget.RecyclerView.Adapter<com.example.lottery.adapter.EntrantHistoryAdapter.ViewHolder>