TypedArray.GetInt(Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieve the integer value for the attribute at <var>index</var>.
[Android.Runtime.Register("getInt", "(II)I", "GetGetInt_IIHandler")]
public virtual int GetInt (int index, int defValue);
[<Android.Runtime.Register("getInt", "(II)I", "GetGetInt_IIHandler")>]
abstract member GetInt : int * int -> int
override this.GetInt : int * int -> int
Parameters
- index
- Int32
Index of attribute to retrieve.
- defValue
- Int32
Value to return if the attribute is not defined or cannot be coerced to an integer.
Returns
Integer value of the attribute, or defValue if the attribute was not defined or could not be coerced to an integer.
- Attributes
Exceptions
if the TypedArray has already been recycled.
Remarks
Retrieve the integer value for the attribute at <var>index</var>.
If the attribute is not an integer, this method will attempt to coerce it to an integer using Integer#decode(String)
.
Java documentation for android.content.res.TypedArray.getInt(int, 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.