Android 3.1 r1 Chinese API documentation (121) -- ResourceCursorTreeAdapter

Source: Internet
Author: User

 

Preface

This chapter is about android. widget. resourceCursorTreeAdapter, version: Android 3.1 r1, for Android 3.0 r1 new API, translated from "xiaoQLu", welcome to its blog: "http://www.cnblogs.com/xiaoQLu", thanks again "xiaoQLu "! I look forward to your participation in Android API translation, contact me over140@gmail.com.

 

Statement

You are welcome to repost, but please keep the original source of the article :)

Blog Garden: http://www.cnblogs.com/

Android Chinese translation group: http://goo.gl/6vJQl

 

Structure

Inheritance relationship

Public abstract classt ResourceCursorTreeAdapter extends CursorTreeAdapter

 

Java. lang. Object

Android. widget. BaseExpandableListAdapter

Android. widget. CursorTreeAdapter

Android. widget. ResourceCursorTreeAdapter

 

Direct subclass

SimpleCursorTreeAdapter

 

Class Overview

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

 

Constructor

PublicResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout, int lastChildLayout)

Constructor.

Parameters

Context: the context of the ListView associated with the running SimpleListItemFactory

Cursor database cursor

CollapsedGroupLayout defines the resource ID of the view layout file of the contraction group.

ExpandedGroupLayout defines the resource ID of the view layout file of the expanded Group.

ChildLayout defines the resource identifier of the layout file except the last child view.

LastChildLayout defines the resource ID of the layout file of the last sub-view in a group.

 

PublicResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout)

Constructor.

Parameters

Context: the context of the ListView associated with the running SimpleListItemFactory

Cursor database cursor

CollapsedGroupLayout defines the resource ID of the view layout file of the contraction group.

ExpandedGroupLayout defines the resource ID of the view layout file of the expanded Group.

ChildLayout defines the resource identifier of the layout file except the last child view.

 

PublicResourceCursorTreeAdapter(Context context, Cursor cursor, int groupLayout, int childLayout)

Constructor.

Parameters

Context: the context of the ListView associated with the running SimpleListItemFactory

Cursor database cursor

GroupLayout defines the resource ID of the view layout file for all groups

ExpandedGroupLayout defines the resource ID of the view layout file of the expanded Group.

ChildLayout defines the resource identifier of the layout file except the last child view.

 

Common Methods

Protected abstract ViewNewChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent)

Create a new child element view and hold the cursor pointing to the data.

Parameters

Context application context object

Cursor obtains the cursor object of data, which has been moved to the correct position.

Whether the IsLastChild sub-element is in the last group

Parent object attached to the new View of the parent.

Return Value

Newly created View

 

Protected abstract ViewNewGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent)

Create a new group view and hold the cursor pointing to data in the group.

Parameters

Context application context object

Cursor obtains the cursor object of data, which has been moved to the correct position.

IsExpanded whether the group is expanded

Parent object attached to the new View of the parent.

Return Value

Newly created View

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.