public class SectionAdapter<T,K> extends BaseAdapter
ListViews.
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
SectionAdapter.Sectionizer<T,K>
Interface provides mechanism for supplying titles for instances based on the property they are
compared against.
|
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION| 构造器和说明 |
|---|
SectionAdapter(Context context,
BaseAdapter listAdapter,
int sectionHeaderLayoutId,
int[] sectionViewIds,
SectionAdapter.Sectionizer<T,K> 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() |
View |
initialize(View view,
int[] children)
Initialize view by binding indexed child views to tags on the root view
Sub-classes may override this method but must call super
|
boolean |
isEmpty() |
boolean |
isEnabled(int position) |
void |
notifyDataSetChanged() |
getDropDownView, hasStableIds, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserverpublic SectionAdapter(Context context, BaseAdapter listAdapter, int sectionHeaderLayoutId, int[] sectionViewIds, SectionAdapter.Sectionizer<T,K> 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.sectionViewIds - Ids of the section header layout.sectionizer - Sectionizer for sectioning the ListView.public int getCount()
public View initialize(View view, int[] children)
view - children - 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