Build 1.0_r1(from source)

android.widget
Class ResourceCursorTreeAdapter

java.lang.Object
  extended by android.widget.BaseExpandableListAdapter
      extended by android.widget.CursorTreeAdapter
          extended by android.widget.ResourceCursorTreeAdapter
All Implemented Interfaces:
CursorFilter.CursorFilterClient, ExpandableListAdapter, Filterable
Direct Known Subclasses:
SimpleCursorTreeAdapter

public abstract class ResourceCursorTreeAdapter
extends CursorTreeAdapter

A fairly simple ExpandableListAdapter that creates views defined in an XML file. You can specify the XML file that defines the appearance of the views.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.widget.CursorTreeAdapter
CursorTreeAdapter.MyCursorHelper
 
Field Summary
 
Fields inherited from class android.widget.CursorTreeAdapter
mChildrenCursorHelpers, mCursorFilter, mFilterQueryProvider, mGroupCursorHelper
 
Constructor Summary
ResourceCursorTreeAdapter(Context context, Cursor cursor, int groupLayout, int childLayout)
          Constructor.
ResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout)
          Constructor.
ResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout, int lastChildLayout)
          Constructor.
 
Method Summary
 View newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent)
          Makes a new child view to hold the data pointed to by cursor.
 View newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent)
          Makes a new group view to hold the group data pointed to by cursor.
 
Methods inherited from class android.widget.CursorTreeAdapter
bindChildView, bindGroupView, changeCursor, convertToString, deactivateChildrenCursorHelper, getChild, getChildId, getChildrenCount, getChildrenCursor, getChildrenCursorHelper, getChildView, getCursor, getFilter, getFilterQueryProvider, getGroup, getGroupCount, getGroupId, getGroupView, hasStableIds, isChildSelectable, notifyDataSetChanged, notifyDataSetChanged, notifyDataSetInvalidated, onGroupCollapsed, runQueryOnBackgroundThread, setChildrenCursor, setFilterQueryProvider, setGroupCursor
 
Methods inherited from class android.widget.BaseExpandableListAdapter
areAllItemsEnabled, getCombinedChildId, getCombinedGroupId, isEmpty, onGroupExpanded, registerDataSetObserver, unregisterDataSetObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceCursorTreeAdapter

public ResourceCursorTreeAdapter(Context context,
                                 Cursor cursor,
                                 int collapsedGroupLayout,
                                 int expandedGroupLayout,
                                 int childLayout,
                                 int lastChildLayout)
Constructor.

Parameters:
context - The context where the ListView associated with this SimpleListItemFactory is running
cursor - The database cursor
collapsedGroupLayout - resource identifier of a layout file that defines the views for collapsed groups.
expandedGroupLayout - resource identifier of a layout file that defines the views for expanded groups.
childLayout - resource identifier of a layout file that defines the views for all children but the last..
lastChildLayout - resource identifier of a layout file that defines the views for the last child of a group.

ResourceCursorTreeAdapter

public ResourceCursorTreeAdapter(Context context,
                                 Cursor cursor,
                                 int collapsedGroupLayout,
                                 int expandedGroupLayout,
                                 int childLayout)
Constructor.

Parameters:
context - The context where the ListView associated with this SimpleListItemFactory is running
cursor - The database cursor
collapsedGroupLayout - resource identifier of a layout file that defines the views for collapsed groups.
expandedGroupLayout - resource identifier of a layout file that defines the views for expanded groups.
childLayout - resource identifier of a layout file that defines the views for all children.

ResourceCursorTreeAdapter

public ResourceCursorTreeAdapter(Context context,
                                 Cursor cursor,
                                 int groupLayout,
                                 int childLayout)
Constructor.

Parameters:
context - The context where the ListView associated with this SimpleListItemFactory is running
cursor - The database cursor
groupLayout - resource identifier of a layout file that defines the views for all groups.
childLayout - resource identifier of a layout file that defines the views for all children.
Method Detail

newChildView

public View newChildView(Context context,
                         Cursor cursor,
                         boolean isLastChild,
                         ViewGroup parent)
Description copied from class: CursorTreeAdapter
Makes a new child view to hold the data pointed to by cursor.

Specified by:
newChildView in class CursorTreeAdapter
Parameters:
context - Interface to application's global information
cursor - The cursor from which to get the data. The cursor is already moved to the correct position.
isLastChild - Whether the child is the last child within its group.
parent - The parent to which the new view is attached to
Returns:
the newly created view.

newGroupView

public View newGroupView(Context context,
                         Cursor cursor,
                         boolean isExpanded,
                         ViewGroup parent)
Description copied from class: CursorTreeAdapter
Makes a new group view to hold the group data pointed to by cursor.

Specified by:
newGroupView in class CursorTreeAdapter
Parameters:
context - Interface to application's global information
cursor - The group cursor from which to get the data. The cursor is already moved to the correct position.
isExpanded - Whether the group is expanded.
parent - The parent to which the new view is attached to
Returns:
The newly created view.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature