com.communipatient.amptedapp.data
Class MyExerciseArrayAdapter
java.lang.Object
android.widget.BaseAdapter
android.widget.ArrayAdapter<Exercise>
com.communipatient.amptedapp.data.MyExerciseArrayAdapter
- All Implemented Interfaces:
- android.widget.Adapter, android.widget.Filterable, android.widget.ListAdapter, android.widget.SpinnerAdapter
public class MyExerciseArrayAdapter
- extends android.widget.ArrayAdapter<Exercise>
The ArrayAdapter for the list of Exercises.
|
Field Summary |
private java.util.List<Exercise> |
data
The list of exercises. |
private android.view.LayoutInflater |
mInflater
The layout inflater. |
private int |
textViewResourceId
The text view resource id. |
| Fields inherited from interface android.widget.Adapter |
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION |
|
Constructor Summary |
MyExerciseArrayAdapter(android.content.Context context,
int textViewResourceId,
java.util.List<Exercise> objects)
Initializes a new instance of the MyExerciseArrayAdapter. |
|
Method Summary |
android.view.View |
getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
Renders the view for the specified position. |
| Methods inherited from class android.widget.ArrayAdapter |
add, clear, createFromResource, getContext, getCount, getDropDownView, getFilter, getItem, getItemId, getPosition, insert, notifyDataSetChanged, remove, setDropDownViewResource, setNotifyOnChange, sort |
| Methods inherited from class android.widget.BaseAdapter |
areAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mInflater
private android.view.LayoutInflater mInflater
- The layout inflater.
data
private java.util.List<Exercise> data
- The list of exercises.
textViewResourceId
private int textViewResourceId
- The text view resource id.
MyExerciseArrayAdapter
public MyExerciseArrayAdapter(android.content.Context context,
int textViewResourceId,
java.util.List<Exercise> objects)
- Initializes a new instance of the MyExerciseArrayAdapter.
- Parameters:
context - The current context.textViewResourceId - The resource ID for a layout file containing a TextView to use
when instantiating views.objects - The objects to represent in the ListView.
getView
public android.view.View getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
- Renders the view for the specified position.
- Specified by:
getView in interface android.widget.Adapter- Overrides:
getView in class android.widget.ArrayAdapter<Exercise>
- Parameters:
position - The position to retrieve.convertView - The reusable view.parent - The parent view.