android.widget
Class CursorTreeAdapter
java.lang.Object
android.widget.BaseExpandableListAdapter
android.widget.CursorTreeAdapter
- All Implemented Interfaces:
- ExpandableListAdapter, Filterable, HeterogeneousExpandableList
- Direct Known Subclasses:
- ResourceCursorTreeAdapter
public abstract class CursorTreeAdapter
- extends BaseExpandableListAdapter
- implements Filterable
Method Summary |
protected abstract void |
bindChildView(View view,
Context context,
Cursor cursor,
boolean isLastChild)
|
protected abstract void |
bindGroupView(View view,
Context context,
Cursor cursor,
boolean isExpanded)
|
void |
changeCursor(Cursor cursor)
|
String |
convertToString(Cursor cursor)
|
Cursor |
getChild(int groupPosition,
int childPosition)
|
long |
getChildId(int groupPosition,
int childPosition)
|
int |
getChildrenCount(int groupPosition)
|
protected abstract Cursor |
getChildrenCursor(Cursor groupCursor)
|
View |
getChildView(int groupPosition,
int childPosition,
boolean isLastChild,
View convertView,
ViewGroup parent)
|
Cursor |
getCursor()
|
Filter |
getFilter()
|
FilterQueryProvider |
getFilterQueryProvider()
|
Cursor |
getGroup(int groupPosition)
|
int |
getGroupCount()
|
long |
getGroupId(int groupPosition)
|
View |
getGroupView(int groupPosition,
boolean isExpanded,
View convertView,
ViewGroup parent)
|
boolean |
hasStableIds()
|
boolean |
isChildSelectable(int groupPosition,
int childPosition)
|
protected abstract View |
newChildView(Context context,
Cursor cursor,
boolean isLastChild,
ViewGroup parent)
|
protected abstract View |
newGroupView(Context context,
Cursor cursor,
boolean isExpanded,
ViewGroup parent)
|
void |
notifyDataSetChanged()
|
void |
notifyDataSetChanged(boolean releaseCursors)
|
void |
notifyDataSetInvalidated()
|
void |
onGroupCollapsed(int groupPosition)
|
Cursor |
runQueryOnBackgroundThread(CharSequence constraint)
|
void |
setChildrenCursor(int groupPosition,
Cursor childrenCursor)
|
void |
setFilterQueryProvider(FilterQueryProvider filterQueryProvider)
|
void |
setGroupCursor(Cursor cursor)
|
Methods inherited from class android.widget.BaseExpandableListAdapter |
areAllItemsEnabled, getChildType, getChildTypeCount, getCombinedChildId, getCombinedGroupId, getGroupType, getGroupTypeCount, isEmpty, onGroupExpanded, registerDataSetObserver, unregisterDataSetObserver |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CursorTreeAdapter
public CursorTreeAdapter(Cursor cursor,
Context context)
CursorTreeAdapter
public CursorTreeAdapter(Cursor cursor,
Context context,
boolean autoRequery)
getChildrenCursor
protected abstract Cursor getChildrenCursor(Cursor groupCursor)
setGroupCursor
public void setGroupCursor(Cursor cursor)
setChildrenCursor
public void setChildrenCursor(int groupPosition,
Cursor childrenCursor)
getChild
public Cursor getChild(int groupPosition,
int childPosition)
- Specified by:
getChild
in interface ExpandableListAdapter
getChildId
public long getChildId(int groupPosition,
int childPosition)
- Specified by:
getChildId
in interface ExpandableListAdapter
getChildrenCount
public int getChildrenCount(int groupPosition)
- Specified by:
getChildrenCount
in interface ExpandableListAdapter
getGroup
public Cursor getGroup(int groupPosition)
- Specified by:
getGroup
in interface ExpandableListAdapter
getGroupCount
public int getGroupCount()
- Specified by:
getGroupCount
in interface ExpandableListAdapter
getGroupId
public long getGroupId(int groupPosition)
- Specified by:
getGroupId
in interface ExpandableListAdapter
getGroupView
public View getGroupView(int groupPosition,
boolean isExpanded,
View convertView,
ViewGroup parent)
- Specified by:
getGroupView
in interface ExpandableListAdapter
newGroupView
protected abstract View newGroupView(Context context,
Cursor cursor,
boolean isExpanded,
ViewGroup parent)
bindGroupView
protected abstract void bindGroupView(View view,
Context context,
Cursor cursor,
boolean isExpanded)
getChildView
public View getChildView(int groupPosition,
int childPosition,
boolean isLastChild,
View convertView,
ViewGroup parent)
- Specified by:
getChildView
in interface ExpandableListAdapter
newChildView
protected abstract View newChildView(Context context,
Cursor cursor,
boolean isLastChild,
ViewGroup parent)
bindChildView
protected abstract void bindChildView(View view,
Context context,
Cursor cursor,
boolean isLastChild)
isChildSelectable
public boolean isChildSelectable(int groupPosition,
int childPosition)
- Specified by:
isChildSelectable
in interface ExpandableListAdapter
hasStableIds
public boolean hasStableIds()
- Specified by:
hasStableIds
in interface ExpandableListAdapter
notifyDataSetChanged
public void notifyDataSetChanged()
- Overrides:
notifyDataSetChanged
in class BaseExpandableListAdapter
notifyDataSetChanged
public void notifyDataSetChanged(boolean releaseCursors)
notifyDataSetInvalidated
public void notifyDataSetInvalidated()
- Overrides:
notifyDataSetInvalidated
in class BaseExpandableListAdapter
onGroupCollapsed
public void onGroupCollapsed(int groupPosition)
- Specified by:
onGroupCollapsed
in interface ExpandableListAdapter
- Overrides:
onGroupCollapsed
in class BaseExpandableListAdapter
convertToString
public String convertToString(Cursor cursor)
runQueryOnBackgroundThread
public Cursor runQueryOnBackgroundThread(CharSequence constraint)
getFilter
public Filter getFilter()
- Specified by:
getFilter
in interface Filterable
getFilterQueryProvider
public FilterQueryProvider getFilterQueryProvider()
setFilterQueryProvider
public void setFilterQueryProvider(FilterQueryProvider filterQueryProvider)
changeCursor
public void changeCursor(Cursor cursor)
getCursor
public Cursor getCursor()
Copyright © 2008-2012. All Rights Reserved.