public class CustomFoodAdapter extends android.widget.ArrayAdapter<FoodLog>
Constructor and Description |
---|
CustomFoodAdapter(android.content.Context context,
int resource,
java.util.List<FoodLog> objects) |
Modifier and Type | Method and Description |
---|---|
int |
getCount() |
FoodLog |
getItem(int position) |
long |
getItemId(int position) |
android.view.View |
getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
Provides the views for the list with delete buttons for each row
|
add, addAll, addAll, clear, createFromResource, getAutofillOptions, getContext, getDropDownView, getDropDownViewTheme, getFilter, getPosition, insert, notifyDataSetChanged, remove, setDropDownViewResource, setDropDownViewTheme, setNotifyOnChange, sort
areAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, setAutofillOptions, unregisterDataSetObserver
public CustomFoodAdapter(@NonNull android.content.Context context, int resource, @NonNull java.util.List<FoodLog> objects)
public int getCount()
getCount
in interface android.widget.Adapter
getCount
in class android.widget.ArrayAdapter<FoodLog>
public FoodLog getItem(int position)
getItem
in interface android.widget.Adapter
getItem
in class android.widget.ArrayAdapter<FoodLog>
public long getItemId(int position)
getItemId
in interface android.widget.Adapter
getItemId
in class android.widget.ArrayAdapter<FoodLog>
public android.view.View getView(int position, android.view.View convertView, android.view.ViewGroup parent)
getView
in interface android.widget.Adapter
getView
in class android.widget.ArrayAdapter<FoodLog>
position
- position of an item in the listconvertView
- view created with the designated custom layoutparent
- list view