Package com.example.qrgo.utilities
Class BasicCommentArrayAdapter
- java.lang.Object
-
- android.widget.BaseAdapter
-
- android.widget.ArrayAdapter<Comment>
-
- com.example.qrgo.utilities.BasicCommentArrayAdapter
-
- All Implemented Interfaces:
android.widget.Adapter
,android.widget.Filterable
,android.widget.ListAdapter
,android.widget.SpinnerAdapter
,android.widget.ThemedSpinnerAdapter
public class BasicCommentArrayAdapter extends android.widget.ArrayAdapter<Comment>
BasicCommentArrayAdapter is an ArrayAdapter for displaying a list of Comment objects in a ListView. The adapter extends the ArrayAdapter class and overrides its getView() method to customize how each item in the ListView is displayed.
-
-
Constructor Summary
Constructors Constructor Description BasicCommentArrayAdapter(android.content.Context context, int resource, java.util.ArrayList<Comment> comments)
Constructor for the BasicCommentArrayAdapter class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.view.View
getView(int position, android.view.View convertView, android.view.ViewGroup parent)
-
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
-
-
-
-
Constructor Detail
-
BasicCommentArrayAdapter
public BasicCommentArrayAdapter(android.content.Context context, int resource, java.util.ArrayList<Comment> comments)
Constructor for the BasicCommentArrayAdapter class.- Parameters:
context
- the context of the activity or fragment that is using the adapter.resource
- the resource ID of the layout file that defines the appearance of each item in the ListView.comments
- the list of Comment objects to be displayed in the ListView.
-
-
Method Detail
-
getView
public android.view.View getView(int position, android.view.View convertView, android.view.ViewGroup parent)
- Specified by:
getView
in interfaceandroid.widget.Adapter
- Overrides:
getView
in classandroid.widget.ArrayAdapter<Comment>
-
-