9.0 Released! → Native ESM runtimes 🚀, Vite support ⚡️, multi-window apps and more...
Read Announcement

Utility module related to layout.

Variables

VariableDescription
AT_MOST-
EXACTLY-
MEASURED_HEIGHT_STATE_SHIFT-
MEASURED_SIZE_MASK-
MEASURED_STATE_MASK-
MEASURED_STATE_TOO_SMALL-
MODE_MASK-
MODE_SHIFTBits that provide the actual measured size.
UNSPECIFIED-

Functions

FunctionDescription
getDisplayDensityGets display density for the current device.
getMeasureSpecModeGets measure specification mode from a given specification.
getMeasureSpecSizeGets measure specification size from a given specification.
getModeGets layout mode from a given specification as string.
hasRtlSupportChecks whether application has RTL support.
makeMeasureSpecCreates measure specification size from size and mode.
measureNativeViewConverts device pixels to device independent pixes and measure the nativeView. Returns the desired size of the nativeView in device pixels.
measureSpecToStringPrints user friendly version of the measureSpec.
roundRounds value used in layout.
toDeviceIndependentPixelsConvert device pixels to device independent pixels - px to dip.
toDevicePixelsConvert device independent pixels to device pixels - dip to px.
Previous
Utils