Resources.GetValueForDensity(Int32, Int32, TypedValue, Boolean) Resources.GetValueForDensity(Int32, Int32, TypedValue, Boolean) Method

Definition

Get the raw value associated with a resource with associated density.

[Android.Runtime.Register("getValueForDensity", "(IILandroid/util/TypedValue;Z)V", "GetGetValueForDensity_IILandroid_util_TypedValue_ZHandler", ApiSince=15)]
public virtual void GetValueForDensity (int id, int density, Android.Util.TypedValue outValue, bool resolveRefs);
abstract member GetValueForDensity : int * int * Android.Util.TypedValue * bool -> unit
override this.GetValueForDensity : int * int * Android.Util.TypedValue * bool -> unit

Parameters

id
Int32 Int32

resource identifier

density
Int32 Int32

density in DPI

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