Android Guides | Samples

Android.Widget.SimpleCursorTreeAdapter Class

An easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file.

See Also: SimpleCursorTreeAdapter

Syntax

[Android.Runtime.Register("android/widget/SimpleCursorTreeAdapter", DoNotGenerateAcw=true)]
public abstract class SimpleCursorTreeAdapter : ResourceCursorTreeAdapter

Remarks

An easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file. You can specify which columns you want, which views you want to display the columns, and the XML file that defines the appearance of these views. Separate XML files for child and groups are possible. Binding occurs in two phases. First, if a NoType:android/widget/SimpleCursorTreeAdapter$ViewBinder;Href=../../../reference/android/widget/SimpleCursorTreeAdapter.ViewBinder.html is available, NoType:android/widget/SimpleCursorTreeAdapter$ViewBinder;Href=../../../reference/android/widget/SimpleCursorTreeAdapter.ViewBinder.html#setViewValue(android.view.View, android.database.Cursor, int) is invoked. If the returned value is true, binding has occurred. If the returned value is false and the view to bind is a TextView, SimpleCursorTreeAdapter.SetViewText(TextView,String) is invoked. If the returned value is false and the view to bind is an ImageView, SimpleCursorTreeAdapter.SetViewImage(ImageView,String) is invoked. If no appropriate binding can be found, an IllegalStateException is thrown.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Widget.SimpleCursorTreeAdapter are listed below.

See Also: ResourceCursorTreeAdapter

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

SetViewText(TextView, String)
Called by bindView() to set the text for a TextView but only if there is no existing ViewBinder or if the existing ViewBinder cannot handle binding to a TextView.

Protected Methods

override
BindChildView(View, Context, ICursor, Boolean)
Bind an existing view to the child data pointed to by cursor
override
BindGroupView(View, Context, ICursor, Boolean)
Bind an existing view to the group data pointed to by cursor.
SetViewImage(ImageView, String)
Called by bindView() to set the image for an ImageView.