public static class ListOfButtons.MyAdapter extends ArrayAdapter<String>
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
Constructor and Description |
---|
ListOfButtons.MyAdapter(Context context,
String[] labels) |
Modifier and Type | Method and Description |
---|---|
boolean |
areAllItemsEnabled()
Indicates whether all the items in this adapter are enabled.
|
View |
getView(int position,
View convertView,
ViewGroup parent)
Get a View that displays the data at the specified position in the data set.
|
add, addAll, addAll, clear, createFromResource, getContext, getCount, getDropDownView, getFilter, getItem, getItemId, getPosition, insert, notifyDataSetChanged, remove, setDropDownViewResource, setNotifyOnChange, sort
getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
public View getView(int position, View convertView, ViewGroup parent)
ArrayAdapter
LayoutInflater.inflate(int, android.view.ViewGroup, boolean)
to specify a root view and to prevent attachment to the root.getView
in interface Adapter
getView
in class ArrayAdapter<String>
position
- The position of the item within the adapter's data set of the item whose view
we want.convertView
- The old view to reuse, if possible. Note: You should check that this view
is non-null and of an appropriate type before using. If it is not possible to convert
this view to display the correct data, this method can create a new view.
Heterogeneous lists can specify their number of view types, so that this View is
always of the right type (see Adapter.getViewTypeCount()
and
Adapter.getItemViewType(int)
).parent
- The parent that this view will eventually be attached topublic boolean areAllItemsEnabled()
ListAdapter
areAllItemsEnabled
in interface ListAdapter
areAllItemsEnabled
in class BaseAdapter
ListAdapter.isEnabled(int)