Package com.example.breeze_seas
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
ConstructorsConstructorDescriptionExploreEventViewAdapter(android.content.Context context, RecyclerViewClickListener itemListener, List<Event> eventList) -
Method Summary
Modifier and TypeMethodDescriptionintvoidonBindViewHolder(com.example.breeze_seas.ExploreEventViewAdapter.ExploreEventViewHolder holder, int position) com.example.breeze_seas.ExploreEventViewAdapter.ExploreEventViewHolderonCreateViewHolder(android.view.ViewGroup parent, int viewType) voidsubmitList(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
-
Constructor Details
-
ExploreEventViewAdapter
public ExploreEventViewAdapter(android.content.Context context, RecyclerViewClickListener itemListener, List<Event> eventList)
-
-
Method Details
-
submitList
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:
onCreateViewHolderin classandroidx.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:
onBindViewHolderin classandroidx.recyclerview.widget.RecyclerView.Adapter<com.example.breeze_seas.ExploreEventViewAdapter.ExploreEventViewHolder>
-
getItemCount
public int getItemCount()- Specified by:
getItemCountin classandroidx.recyclerview.widget.RecyclerView.Adapter<com.example.breeze_seas.ExploreEventViewAdapter.ExploreEventViewHolder>
-