Package com.example.oblong.entrant
Class EntrantMyEventsArrayAdapter
java.lang.Object
android.widget.BaseAdapter
android.widget.ArrayAdapter<Event>
com.example.oblong.entrant.EntrantMyEventsArrayAdapter
- All Implemented Interfaces:
android.widget.Adapter
,android.widget.Filterable
,android.widget.ListAdapter
,android.widget.SpinnerAdapter
,android.widget.ThemedSpinnerAdapter
Custom ArrayAdapter for displaying a list of events in the entrant's "My Events" section.
This adapter is used to populate a ListView with event details such as the event name, draw date, and options to view or accept the event invite. It handles the click actions for the buttons that navigate to detailed event description activities.
-
Field Summary
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
-
Constructor Summary
ConstructorDescriptionEntrantMyEventsArrayAdapter
(android.content.Context context, ArrayList<Event> events) Constructor for the EntrantMyEventsArrayAdapter. -
Method Summary
Modifier and TypeMethodDescriptionandroid.view.View
getView
(int position, android.view.View convertView, android.view.ViewGroup parent) Provides a view for an AdapterView (ListView) using the data at the specified position.Methods inherited from class android.widget.ArrayAdapter
add, addAll, addAll, clear, createFromResource, getAutofillOptions, getContext, getCount, getDropDownView, getDropDownViewTheme, getFilter, getItem, getItemId, getPosition, insert, notifyDataSetChanged, remove, setDropDownViewResource, setDropDownViewTheme, setNotifyOnChange, sort
Methods inherited from class android.widget.BaseAdapter
areAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, setAutofillOptions, unregisterDataSetObserver
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface android.widget.Adapter
getItemViewType, getViewTypeCount, hasStableIds, isEmpty, registerDataSetObserver, unregisterDataSetObserver
-
Constructor Details
-
EntrantMyEventsArrayAdapter
Constructor for the EntrantMyEventsArrayAdapter.- Parameters:
context
- The context in which the adapter is being used.events
- The list of Event objects to be displayed.
-
-
Method Details
-
getView
@NonNull public android.view.View getView(int position, @Nullable android.view.View convertView, @NonNull android.view.ViewGroup parent) Provides a view for an AdapterView (ListView) using the data at the specified position.This method inflates a custom layout for each item in the list and sets the event name, draw date, and handles the click events for "View" and "Accept" buttons.
- Specified by:
getView
in interfaceandroid.widget.Adapter
- Overrides:
getView
in classandroid.widget.ArrayAdapter<Event>
- Parameters:
position
- The position of the item within the adapter's data set.convertView
- The old view to reuse, if possible.parent
- The parent ViewGroup that this view will eventually be attached to.- Returns:
- The View corresponding to the data at the specified position.
-