Android
android.widget
public abstract class

android.widget.ResourceCursorTreeAdapter

java.lang.Object
android.widget.BaseExpandableListAdapter ExpandableListAdapter
android.widget.CursorTreeAdapter Filterable
android.widget.ResourceCursorTreeAdapter

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.

Known Direct Subclasses

Summary

Public Constructors

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

Public Methods

          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
Methods inherited from class android.widget.BaseExpandableListAdapter
Methods inherited from class java.lang.Object
Methods inherited from interface android.widget.ExpandableListAdapter
Methods inherited from interface android.widget.Filterable

Details

Public Constructors

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.

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.

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.

Public Methods

public View newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent)

Makes a new child view to hold the data pointed to by cursor.

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.

public View newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent)

Makes a new group view to hold the group data pointed to by cursor.

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.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56