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

public class AdminUserEventArrayAdapter extends android.widget.ArrayAdapter<Object>
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

    Constructors
    Constructor
    Description
    AdminUserEventArrayAdapter(android.content.Context context, ArrayList<Object> objects)
    Constructor for the AdminUserEventArrayAdapter.
  • Method Summary

    Modifier and Type
    Method
    Description
    android.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

      public AdminUserEventArrayAdapter(android.content.Context context, ArrayList<Object> objects)
      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 interface android.widget.Adapter
      Overrides:
      getView in class android.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.