共用方式為


ImageView.SetImageState(Int32[], Boolean) Method

Definition

Set the state of the current android.graphics.drawable.StateListDrawable.

[Android.Runtime.Register("setImageState", "([IZ)V", "GetSetImageState_arrayIZHandler")]
public virtual void SetImageState (int[]? state, bool merge);
[<Android.Runtime.Register("setImageState", "([IZ)V", "GetSetImageState_arrayIZHandler")>]
abstract member SetImageState : int[] * bool -> unit
override this.SetImageState : int[] * bool -> unit

Parameters

state
Int32[]

the state to set for the StateListDrawable

merge
Boolean

if true, merges the state values for the state you specify into the current state

Attributes

Remarks

Set the state of the current android.graphics.drawable.StateListDrawable. For more information about State List Drawables, see: the Drawable Resource Guide.

Java documentation for android.widget.ImageView.setImageState(int[], boolean).

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