Package icyllis.modernui.view.menu
Class MenuAdapter
java.lang.Object
icyllis.modernui.widget.BaseAdapter
icyllis.modernui.view.menu.MenuAdapter
- All Implemented Interfaces:
Adapter
,ListAdapter
,SpinnerAdapter
-
Field Summary
Fields inherited from interface icyllis.modernui.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getCount()
How many items are in the data set represented by this Adapter.boolean
getItem
(int position) Get the data item associated with the specified position in the data set.long
getItemId
(int position) Get the row id associated with the specified position in the list.Get a View that displays the data at the specified position in the data set.void
Notifies the attached observers that the underlying data has been changed and any View reflecting the data set should refresh itself.void
setForceShowIcon
(boolean forceShow) Methods inherited from class icyllis.modernui.widget.BaseAdapter
areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
-
Constructor Details
-
Method Details
-
getForceShowIcon
public boolean getForceShowIcon() -
setForceShowIcon
public void setForceShowIcon(boolean forceShow) -
getCount
public int getCount()Description copied from interface:Adapter
How many items are in the data set represented by this Adapter.- Returns:
- Count of items.
-
getAdapterMenu
-
getItem
Description copied from interface:Adapter
Get the data item associated with the specified position in the data set.- Parameters:
position
- Position of the item whose data we want within the adapter's data set.- Returns:
- The data at the specified position, may be null.
-
getItemId
public long getItemId(int position) Description copied from interface:Adapter
Get the row id associated with the specified position in the list.- Parameters:
position
- The position of the item within the adapter's data set whose row id we want.- Returns:
- The id of the item at the specified position.
-
getView
Description copied from interface:Adapter
Get a View that displays the data at the specified position in the data set. You can create a View manually.This method should not return null unless the item count is zero.
- Parameters:
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 (seeAdapter.getViewTypeCount()
andAdapter.getItemViewType(int)
).parent
- The parent that this view will eventually be attached to- Returns:
- A View corresponding to the data at the specified position.
-
notifyDataSetChanged
public void notifyDataSetChanged()Description copied from class:BaseAdapter
Notifies the attached observers that the underlying data has been changed and any View reflecting the data set should refresh itself.- Overrides:
notifyDataSetChanged
in classBaseAdapter
-