Udostępnij za pośrednictwem


View.OnCreateDrawableState(Int32) Method

Definition

Generate the new android.graphics.drawable.Drawable state for this view.

[Android.Runtime.Register("onCreateDrawableState", "(I)[I", "GetOnCreateDrawableState_IHandler")]
protected virtual int[]? OnCreateDrawableState (int extraSpace);
[<Android.Runtime.Register("onCreateDrawableState", "(I)[I", "GetOnCreateDrawableState_IHandler")>]
abstract member OnCreateDrawableState : int -> int[]
override this.OnCreateDrawableState : int -> int[]

Parameters

extraSpace
Int32

if non-zero, this is the number of extra entries you would like in the returned array in which you can place your own states.

Returns

Int32[]

Returns an array holding the current Drawable state of the view.

Attributes

Remarks

Generate the new android.graphics.drawable.Drawable state for this view. This is called by the view system when the cached Drawable state is determined to be invalid. To retrieve the current state, you should use #getDrawableState.

Java documentation for android.view.View.onCreateDrawableState(int).

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

See also

  • <xref:Android.Views.View.MergeDrawableStates(System.Int32%5b%5d%2c+System.Int32%5b%5d)>