Package com.example.oblong.admin
Class AdminUserEventArrayAdapter
java.lang.Object
android.widget.BaseAdapter
android.widget.ArrayAdapter<Object>
com.example.oblong.admin.AdminUserEventArrayAdapter
- 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 or users in the admin "Profile Browser" or "Event Browser" section.
This adapter is used to populate a ListView with events and users. It handles the click actions for deletions
-
Field Summary
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
-
Constructor Summary
ConstructorsConstructorDescriptionAdminUserEventArrayAdapter
(android.content.Context context, ArrayList<Object> objects) Constructor for the AdminUserEventArrayAdapter. -
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
-
AdminUserEventArrayAdapter
Constructor for the AdminUserEventArrayAdapter.- Parameters:
context
- The context in which the adapter is being used.objects
- The list of Event and User 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 list item name, profile pictures, and deletion buttons accordingly.
- Specified by:
getView
in interfaceandroid.widget.Adapter
- Overrides:
getView
in classandroid.widget.ArrayAdapter<Object>
- 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.
-