Android Guides | Samples

Android.Content.Res.Resources.GetValue Method

Return the raw data associated with a particular resource ID.

Syntax

[Android.Runtime.Register("getValue", "(ILandroid/util/TypedValue;Z)V", "GetGetValue_ILandroid_util_TypedValue_ZHandler")]
public virtual Void GetValue (Int32 id, TypedValue outValue, Boolean resolveRefs)

Parameters

id
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.
outValue
Object in which to place the resource data.
resolveRefs
If true, a resource that is a reference to another resource will be followed so that you receive the actual final resource data. If false, the TypedValue will be filled in with the reference itself.

Exceptions

TypeReason
!:NoType:android/content/res/Resources$NotFoundException;Href=../../../../reference/android/content/res/Resources.NotFoundException.htmlThrows NotFoundException if the given ID does not exist.

Remarks

Return the raw data associated with a particular resource ID.

[Android Documentation]

Requirements

Namespace: Android.Content.Res
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1