public class SimpleSectionAdapter<T> extends BaseAdapter
ListViews.
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
SimpleSectionAdapter.Sectionizer<T>
Interface provides mechanism for supplying titles for instances based on the property they are
compared against.
|
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION| 构造器和说明 |
|---|
SimpleSectionAdapter(Context context,
BaseAdapter listAdapter,
int sectionHeaderLayoutId,
int sectionTitleTextViewId,
SimpleSectionAdapter.Sectionizer<T> sectionizer)
Constructs a SimpleSectionAdapter.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
areAllItemsEnabled() |
int |
getCount() |
int |
getIndexForPosition(int position)
Returns the actual index of the object in the data source linked to the this list item.
|
Object |
getItem(int position) |
long |
getItemId(int position) |
int |
getItemViewType(int position) |
View |
getView(int position,
View convertView,
ViewGroup parent) |
int |
getViewTypeCount() |
boolean |
isEmpty() |
boolean |
isEnabled(int position) |
void |
notifyDataSetChanged() |
getDropDownView, hasStableIds, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserverpublic SimpleSectionAdapter(Context context, BaseAdapter listAdapter, int sectionHeaderLayoutId, int sectionTitleTextViewId, SimpleSectionAdapter.Sectionizer<T> sectionizer)
context - The context for this adapter.listAdapter - A ListAdapter that has to be sectioned.sectionHeaderLayoutId - Layout Id of the layout that is to be used for the header.sectionTitleTextViewId - Id of a TextView present in the section header layout.sectionizer - Sectionizer for sectioning the ListView.public int getCount()
public boolean areAllItemsEnabled()
areAllItemsEnabled 在接口中 ListAdapterareAllItemsEnabled 在类中 BaseAdapterpublic int getItemViewType(int position)
getItemViewType 在接口中 AdaptergetItemViewType 在类中 BaseAdapterpublic int getViewTypeCount()
getViewTypeCount 在接口中 AdaptergetViewTypeCount 在类中 BaseAdapterpublic boolean isEnabled(int position)
isEnabled 在接口中 ListAdapterisEnabled 在类中 BaseAdapterpublic Object getItem(int position)
public long getItemId(int position)
public void notifyDataSetChanged()
notifyDataSetChanged 在类中 BaseAdapterpublic int getIndexForPosition(int position)
position - List item position in the ListView.public boolean isEmpty()
isEmpty 在接口中 AdapterisEmpty 在类中 BaseAdapter