Class ExploreEventViewAdapter

java.lang.Object
androidx.recyclerview.widget.RecyclerView.Adapter<com.example.breeze_seas.ExploreEventViewAdapter.ExploreEventViewHolder>
com.example.breeze_seas.ExploreEventViewAdapter

public class ExploreEventViewAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<com.example.breeze_seas.ExploreEventViewAdapter.ExploreEventViewHolder>
Binds event cards for the Explore list and routes taps back to the hosting screen.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    ExploreEventViewAdapter(android.content.Context context, RecyclerViewClickListener itemListener, List<Event> eventList)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    void
    onBindViewHolder(com.example.breeze_seas.ExploreEventViewAdapter.ExploreEventViewHolder holder, int position)
     
    com.example.breeze_seas.ExploreEventViewAdapter.ExploreEventViewHolder
    onCreateViewHolder(android.view.ViewGroup parent, int viewType)
     
    void
    submitList(List<Event> newEvents)
    Replaces the current Explore list contents.

    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

    • submitList

      public void submitList(@NonNull List<Event> newEvents)
      Replaces the current Explore list contents.
      Parameters:
      newEvents - Events that should currently be visible in Explore.
    • onCreateViewHolder

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

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

      public int getItemCount()
      Specified by:
      getItemCount in class androidx.recyclerview.widget.RecyclerView.Adapter<com.example.breeze_seas.ExploreEventViewAdapter.ExploreEventViewHolder>