Partager via


TypedValue.GetDimension(DisplayMetrics) Method

Definition

Return the data for this value as a dimension.

[Android.Runtime.Register("getDimension", "(Landroid/util/DisplayMetrics;)F", "GetGetDimension_Landroid_util_DisplayMetrics_Handler")]
public virtual float GetDimension (Android.Util.DisplayMetrics? metrics);
[<Android.Runtime.Register("getDimension", "(Landroid/util/DisplayMetrics;)F", "GetGetDimension_Landroid_util_DisplayMetrics_Handler")>]
abstract member GetDimension : Android.Util.DisplayMetrics -> single
override this.GetDimension : Android.Util.DisplayMetrics -> single

Parameters

metrics
DisplayMetrics

Current display metrics to use in the conversion -- supplies display density and scaling information.

Returns

The complex floating point value multiplied by the appropriate metrics depending on its unit.

Attributes

Remarks

Return the data for this value as a dimension. Only use for values whose type is #TYPE_DIMENSION.

Java documentation for android.util.TypedValue.getDimension(android.util.DisplayMetrics).

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