Class EntrantEventAdapter

java.lang.Object
androidx.recyclerview.widget.RecyclerView.Adapter<com.example.lottery.adapter.EntrantEventAdapter.EntrantEventViewHolder>
com.example.lottery.adapter.EntrantEventAdapter

public class EntrantEventAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<com.example.lottery.adapter.EntrantEventAdapter.EntrantEventViewHolder>
RecyclerView adapter used to display events to entrants on the EntrantMainActivity screen.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Listener interface used to notify when an event item is clicked.

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

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

    Constructors
    Constructor
    Description
    Constructs an EntrantEventAdapter.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    void
    onBindViewHolder(com.example.lottery.adapter.EntrantEventAdapter.EntrantEventViewHolder holder, int position)
     
    com.example.lottery.adapter.EntrantEventAdapter.EntrantEventViewHolder
    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

    • EntrantEventAdapter

      public EntrantEventAdapter(List<Event> eventList, EntrantEventAdapter.OnEventClickListener listener, String userId)
      Constructs an EntrantEventAdapter.
      Parameters:
      eventList - list of events to display
      listener - listener that handles event selection
      userId - current user ID (unused, kept for API compatibility)
  • Method Details

    • onCreateViewHolder

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

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

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