Partager via


Resources.GetInteger(Int32) Method

Definition

Return an integer associated with a particular resource ID.

[Android.Runtime.Register("getInteger", "(I)I", "GetGetInteger_IHandler")]
public virtual int GetInteger (int id);
[<Android.Runtime.Register("getInteger", "(I)I", "GetGetInteger_IHandler")>]
abstract member GetInteger : int -> int
override this.GetInteger : int -> int

Parameters

id
Int32

The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.

Returns

Returns the integer value contained in the resource.

Attributes

Exceptions

Throws NotFoundException if the given ID does not exist.

Remarks

Return an integer associated with a particular resource ID.

Java documentation for android.content.res.Resources.getInteger(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