public class AdapterWrapper extends Object implements WrapperListAdapter
WrapperListAdapter implementation that may be used to wrap instance of ListAdapter.| Modifier and Type | Field and Description |
|---|---|
protected ListAdapter |
mAdapter
Wrapped instance of ListAdapter.
|
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION| Constructor and Description |
|---|
AdapterWrapper(ListAdapter adapter)
Creates a new instance of AdapterWrapper which wraps the given adapter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areAllItemsEnabled() |
int |
getCount() |
Object |
getItem(int position) |
long |
getItemId(int position) |
int |
getItemViewType(int position) |
View |
getView(int position,
View convertView,
ViewGroup parent) |
int |
getViewTypeCount() |
ListAdapter |
getWrappedAdapter() |
boolean |
hasStableIds() |
boolean |
isEmpty() |
boolean |
isEnabled(int position) |
void |
registerDataSetObserver(DataSetObserver observer) |
void |
unregisterDataSetObserver(DataSetObserver observer) |
protected final ListAdapter mAdapter
public AdapterWrapper(@Nullable ListAdapter adapter)
adapter - An instance of the adapter to be wrapped. May be null to create empty
adapter wrapper.@Nullable public ListAdapter getWrappedAdapter()
getWrappedAdapter in interface WrapperListAdapterpublic void registerDataSetObserver(@NonNull DataSetObserver observer)
registerDataSetObserver in interface Adapterpublic void unregisterDataSetObserver(@NonNull DataSetObserver observer)
unregisterDataSetObserver in interface Adapterpublic boolean hasStableIds()
hasStableIds in interface Adapterpublic int getViewTypeCount()
getViewTypeCount in interface Adapterpublic int getItemViewType(int position)
getItemViewType in interface Adapterpublic boolean areAllItemsEnabled()
areAllItemsEnabled in interface ListAdapterpublic boolean isEnabled(int position)
isEnabled in interface ListAdapter