public abstract class ResourceCursorTreeAdapter
extends CursorTreeAdapter
| java.lang.Object | |||
| android.widget.BaseExpandableListAdapter | |||
| android.widget.CursorTreeAdapter | |||
| android.widget.ResourceCursorTreeAdapter | |||
| |
一个相当简单的ExpandableListAdapter,用于创建在XML文件中定义的视图。 您可以指定定义视图外观的XML文件。
Public constructors |
|
|---|---|
ResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout, int lastChildLayout) 构造函数。 |
|
ResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout) 构造函数。 |
|
ResourceCursorTreeAdapter(Context context, Cursor cursor, int groupLayout, int childLayout) 构造函数。 |
|
公共方法(Public methods) |
|
|---|---|
View |
newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent) 创建一个新的子视图来保存指针指向的数据。 |
View |
newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) 创建一个新的组视图来保存指针指向的组数据。 |
继承方法(Inherited methods) |
|
|---|---|
android.widget.CursorTreeAdapter
|
|
android.widget.BaseExpandableListAdapter
|
|
java.lang.Object
|
|
android.widget.Filterable
|
|
android.widget.ExpandableListAdapter
|
|
android.widget.HeterogeneousExpandableList
|
|
ResourceCursorTreeAdapter (Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout, int lastChildLayout)
构造函数。
| 参数(Parameters) | |
|---|---|
context |
Context: The context where the ListView associated with this SimpleListItemFactory is running |
cursor |
Cursor: The database cursor |
collapsedGroupLayout |
int: resource identifier of a layout file that defines the views for collapsed groups. |
expandedGroupLayout |
int: resource identifier of a layout file that defines the views for expanded groups. |
childLayout |
int: resource identifier of a layout file that defines the views for all children but the last.. |
lastChildLayout |
int: resource identifier of a layout file that defines the views for the last child of a group. |
ResourceCursorTreeAdapter (Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout)
构造函数。
| 参数(Parameters) | |
|---|---|
context |
Context: The context where the ListView associated with this SimpleListItemFactory is running |
cursor |
Cursor: The database cursor |
collapsedGroupLayout |
int: resource identifier of a layout file that defines the views for collapsed groups. |
expandedGroupLayout |
int: resource identifier of a layout file that defines the views for expanded groups. |
childLayout |
int: resource identifier of a layout file that defines the views for all children. |
ResourceCursorTreeAdapter (Context context, Cursor cursor, int groupLayout, int childLayout)
构造函数。
| 参数(Parameters) | |
|---|---|
context |
Context: The context where the ListView associated with this SimpleListItemFactory is running |
cursor |
Cursor: The database cursor |
groupLayout |
int: resource identifier of a layout file that defines the views for all groups. |
childLayout |
int: resource identifier of a layout file that defines the views for all children. |
View newChildView (Context context, Cursor cursor, boolean isLastChild, ViewGroup parent)
创建一个新的子视图来保存指针指向的数据。
| 参数(Parameters) | |
|---|---|
context |
Context: Interface to application's global information |
cursor |
Cursor: The cursor from which to get the data. The cursor is already moved to the correct position. |
isLastChild |
boolean: Whether the child is the last child within its group. |
parent |
ViewGroup: The parent to which the new view is attached to |
| 返回(Returns) | |
|---|---|
View |
the newly created view. |
View newGroupView (Context context, Cursor cursor, boolean isExpanded, ViewGroup parent)
创建一个新的组视图来保存指针指向的组数据。
| 参数(Parameters) | |
|---|---|
context |
Context: Interface to application's global information |
cursor |
Cursor: The group cursor from which to get the data. The cursor is already moved to the correct position. |
isExpanded |
boolean: Whether the group is expanded. |
parent |
ViewGroup: The parent to which the new view is attached to |
| 返回(Returns) | |
|---|---|
View |
The newly created view. |