|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.widget.BaseAdapter
de.msponer.android.yac.adapter.SectionedWorkListAdapter
public abstract class SectionedWorkListAdapter
A sectioned work item adapter. Based on ideas presented in "The Busy Coder's Guide to Advanced Android Development" (see http://commonsware.com/AdvAndroid)
Field Summary |
---|
Fields inherited from interface android.widget.Adapter |
---|
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION |
Constructor Summary | |
---|---|
SectionedWorkListAdapter()
Constructor. |
Method Summary | |
---|---|
void |
addSection(String caption,
Adapter adapter)
Adds a new section. |
boolean |
areAllItemsSelectable()
Returns true, if all items are selectable. |
int |
getCount()
The section count. |
protected abstract View |
getHeaderView(String caption,
int index,
View convertView,
ViewGroup parent)
The header view. |
Object |
getItem(int position)
Returns item object located at the given position. |
long |
getItemId(int position)
|
int |
getItemViewType(int position)
The view type count located at the given position. |
Adapter |
getSectionAdapter(int section)
Returns the section adapter located at the given position. |
View |
getView(int position,
View convertView,
ViewGroup parent)
|
int |
getViewTypeCount()
The view type count. |
boolean |
isEnabled(int position)
Returns true if item at the given position is enabled. |
Methods inherited from class android.widget.BaseAdapter |
---|
areAllItemsEnabled, getDropDownView, hasStableIds, isEmpty, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SectionedWorkListAdapter()
Method Detail |
---|
protected abstract View getHeaderView(String caption, int index, View convertView, ViewGroup parent)
caption
- The caption.index
- The index.convertView
- The view to convert.parent
- The parent view.
public void addSection(String caption, Adapter adapter)
caption
- The section caption.adapter
- The adapter to add.public Object getItem(int position)
position
- The position.
public int getCount()
public int getViewTypeCount()
getViewTypeCount
in interface Adapter
getViewTypeCount
in class BaseAdapter
public int getItemViewType(int position)
getItemViewType
in interface Adapter
getItemViewType
in class BaseAdapter
position
- The position.
public boolean areAllItemsSelectable()
public boolean isEnabled(int position)
isEnabled
in interface ListAdapter
isEnabled
in class BaseAdapter
position
- The position to check.
public View getView(int position, View convertView, ViewGroup parent)
public long getItemId(int position)
public Adapter getSectionAdapter(int section)
section
- The section number to return.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |