Android Guides | Samples

Android.Graphics.Drawables.StateListDrawable Class

Lets you assign a number of graphic images to a single Drawable and swap out the visible item by a string ID value.

See Also: StateListDrawable

Syntax

[Android.Runtime.Register("android/graphics/drawable/StateListDrawable", DoNotGenerateAcw=true)]
public class StateListDrawable : DrawableContainer

Remarks

Lets you assign a number of graphic images to a single Drawable and swap out the visible item by a string ID value.

It can be defined in an XML file with the <selector> element. Each state Drawable is defined in a nested <item> element. For more information, see the guide to Drawable Resources.

[Android Documentation]

Requirements

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

The members of Android.Graphics.Drawables.StateListDrawable are listed below.

See Also: DrawableContainer

Public Constructors

Protected Constructors

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

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

AddState(Int32[], Drawable)
Add a new image/string ID to the set of images.