Resources.GetValue Resources.GetValue Method

Definition

Overloads

GetValue(String, TypedValue, Boolean) GetValue(String, TypedValue, Boolean)

Return the raw data associated with a particular resource ID.

GetValue(Int32, TypedValue, Boolean) GetValue(Int32, TypedValue, Boolean)

Return the raw data associated with a particular resource ID.

GetValue(String, TypedValue, Boolean) GetValue(String, TypedValue, Boolean)

Return the raw data associated with a particular resource ID.

[Android.Runtime.Register("getValue", "(Ljava/lang/String;Landroid/util/TypedValue;Z)V", "GetGetValue_Ljava_lang_String_Landroid_util_TypedValue_ZHandler")]
public virtual void GetValue (string name, Android.Util.TypedValue outValue, bool resolveRefs);
abstract member GetValue : string * Android.Util.TypedValue * bool -> unit
override this.GetValue : string * Android.Util.TypedValue * bool -> unit

Parameters

name
String String

The name of the desired resource. This is passed to getIdentifier() with a default type of "string".

outValue
TypedValue TypedValue

Object in which to place the resource data.

resolveRefs
Boolean Boolean

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

Throws NotFoundException if the given ID does not exist.

Remarks

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.

GetValue(Int32, TypedValue, Boolean) GetValue(Int32, TypedValue, Boolean)

Return the raw data associated with a particular resource ID.

[Android.Runtime.Register("getValue", "(ILandroid/util/TypedValue;Z)V", "GetGetValue_ILandroid_util_TypedValue_ZHandler")]
public virtual void GetValue (int id, Android.Util.TypedValue outValue, bool resolveRefs);
abstract member GetValue : int * Android.Util.TypedValue * bool -> unit
override this.GetValue : int * Android.Util.TypedValue * bool -> unit

Parameters

id
Int32 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.

outValue
TypedValue TypedValue

Object in which to place the resource data.

resolveRefs
Boolean Boolean

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

Throws NotFoundException if the given ID does not exist.

Remarks

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