Udostępnij za pośrednictwem


Drawable.GetState Method

Definition

Describes the current state, as a union of primitve states, such as android.R.attr#state_focused, android.R.attr#state_selected, etc.

[Android.Runtime.Register("getState", "()[I", "GetGetStateHandler")]
public virtual int[] GetState ();
[<Android.Runtime.Register("getState", "()[I", "GetGetStateHandler")>]
abstract member GetState : unit -> int[]
override this.GetState : unit -> int[]

Returns

Int32[]

An array of resource Ids describing the current state.

Attributes

Remarks

Describes the current state, as a union of primitve states, such as android.R.attr#state_focused, android.R.attr#state_selected, etc. Some drawables may modify their imagery based on the selected state.

Java documentation for android.graphics.drawable.Drawable.getState().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to