Package com.example.oblong.organizer
Class AttendeesArrayAdapter
java.lang.Object
android.widget.BaseAdapter
com.example.oblong.organizer.AttendeesArrayAdapter
- All Implemented Interfaces:
android.widget.Adapter
,android.widget.ListAdapter
,android.widget.SpinnerAdapter
public class AttendeesArrayAdapter
extends android.widget.BaseAdapter
EntrantUpcomingEventsFragment
This class handles the list of attendees to an event
to be displayed for the Organizer-
Field Summary
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
-
Constructor Summary
ConstructorsConstructorDescriptionAttendeesArrayAdapter
(android.content.Context context, List<Map<String, String>> attendees) Constructor for AttendeesArrayAdapter -
Method Summary
Modifier and TypeMethodDescriptionint
getCount()
ThegetCount
gets the size of the attendees listgetItem
(int position) ThegetItem
gets the attendee at a given index in the attendees listlong
getItemId
(int position) android.view.View
getView
(int position, android.view.View convertView, android.view.ViewGroup parent) Provides a view for a BaseAdapter (ListView) using the data at the specified position.Methods inherited from class android.widget.BaseAdapter
areAllItemsEnabled, getAutofillOptions, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, setAutofillOptions, unregisterDataSetObserver
-
Constructor Details
-
AttendeesArrayAdapter
Constructor for AttendeesArrayAdapter- Parameters:
context
- The context where the array adapter will be usedattendees
- The list of attendee Map objects to an event
-
-
Method Details
-
getCount
public int getCount()ThegetCount
gets the size of the attendees list- Returns:
- The size of attendees as an integer
-
getItem
ThegetItem
gets the attendee at a given index in the attendees list- Parameters:
position
- The position of an item in the attendees list- Returns:
- Map object at the index position
-
getItemId
public long getItemId(int position) -
getView
public android.view.View getView(int position, android.view.View convertView, android.view.ViewGroup parent) Provides a view for a BaseAdapter (ListView) using the data at the specified position.This method inflates a custom layout for each item in the list and sets the attendee name and status.
- 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.
-