TypedValue.ComplexToDimensionPixelSize(Int32, 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 a complex data value holding a dimension to its final value as an integer pixel size.
[Android.Runtime.Register("complexToDimensionPixelSize", "(ILandroid/util/DisplayMetrics;)I", "")]
public static int ComplexToDimensionPixelSize (int data, Android.Util.DisplayMetrics? metrics);
[<Android.Runtime.Register("complexToDimensionPixelSize", "(ILandroid/util/DisplayMetrics;)I", "")>]
static member ComplexToDimensionPixelSize : int * Android.Util.DisplayMetrics -> int
Parameters
- data
- Int32
A complex data value holding a unit, magnitude, and mantissa.
- metrics
- DisplayMetrics
Current display metrics to use in the conversion -- supplies display density and scaling information.
Returns
The number of pixels specified by the data and its desired multiplier and units.
- Attributes
Remarks
Converts a complex data value holding a dimension to its final value as an integer pixel size. This is the same as #complexToDimension
, except the raw floating point value is converted to an integer (pixel) value for use as a size. A size conversion involves rounding the base value, and ensuring that a non-zero base value is at least one pixel in size. The given <var>data</var> must be structured as a #TYPE_DIMENSION
.
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.