Udostępnij za pośrednictwem


SparseBooleanArray.SetValueAt(Int32, Boolean) Method

Definition

Directly set the value at a particular index.

[Android.Runtime.Register("setValueAt", "(IZ)V", "GetSetValueAt_IZHandler", ApiSince=29)]
public virtual void SetValueAt (int index, bool value);
[<Android.Runtime.Register("setValueAt", "(IZ)V", "GetSetValueAt_IZHandler", ApiSince=29)>]
abstract member SetValueAt : int * bool -> unit
override this.SetValueAt : int * bool -> unit

Parameters

index
Int32
value
Boolean
Attributes

Remarks

Directly set the value at a particular index.

For indices outside of the range 0...size()-1, the behavior is undefined for apps targeting android.os.Build.VERSION_CODES#P and earlier, and an ArrayIndexOutOfBoundsException is thrown for apps targeting android.os.Build.VERSION_CODES#Q and later.

Java documentation for android.util.SparseBooleanArray.setValueAt(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