TypedValue.ApplyDimension(ComplexUnitType, Single, DisplayMetrics) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts an unpacked complex data value holding a dimension to its final floating point value.
[Android.Runtime.Register("applyDimension", "(IFLandroid/util/DisplayMetrics;)F", "")]
public static float ApplyDimension (Android.Util.ComplexUnitType unit, float value, Android.Util.DisplayMetrics? metrics);
[<Android.Runtime.Register("applyDimension", "(IFLandroid/util/DisplayMetrics;)F", "")>]
static member ApplyDimension : Android.Util.ComplexUnitType * single * Android.Util.DisplayMetrics -> single
Parameters
- unit
- ComplexUnitType
The unit to convert from.
- value
- Single
The value to apply the unit to.
- 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
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.