Android Guides | Samples

Android.Util.StateSet Class

State sets are arrays of positive ints where each element represents the state of a View (e.g. focused, selected, visible, etc.

See Also: StateSet

Syntax

[Android.Runtime.Register("android/util/StateSet", DoNotGenerateAcw=true)]
public class StateSet : Object

Remarks

State sets are arrays of positive ints where each element represents the state of a View (e.g. focused, selected, visible, etc.). A View may be in one or more of those states. A state spec is an array of signed ints where each element represents a required (if positive) or an undesired (if negative) View state. Utils dealing with state sets. In theory we could encapsulate the state set and state spec arrays and not have static methods here but there is some concern about performance since these methods are called during view drawing.

[Android Documentation]

Requirements

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

The members of Android.Util.StateSet are listed below.

See Also: Object

Public Constructors

Protected Constructors

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

Public Properties

[read-only]
static
NothingIList<int>. A state set that does not contain any valid states.
[read-only]
static
WildCardIList<int>. A state specification that will be matched by all StateSets.

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

static
Dump(Int32[]) : String
static
IsWildCard(Int32[]) : Boolean
Return whether the stateSetOrSpec is matched by all StateSets.
static
StateSetMatches(Int32[], Int32) : Boolean
Return whether the state matches the desired stateSpec.
static
StateSetMatches(Int32[], Int32[]) : Boolean
Return whether the stateSet matches the desired stateSpec.
static
TrimStateSet(Int32[], Int32) : Int32[]