Note: You are on the beta version of our docs. This is a work in progress and may contain broken links and pages. 
Namespaces
Utils.layout
Utility module related to layout.
Summary 
Variables
Variables 
AT_MOST 
EXACTLY 
MEASURED_HEIGHT_STATE_SHIFT 
Bits that provide the actual measured size.
MEASURED_SIZE_MASK 
MEASURED_STATE_MASK 
MEASURED_STATE_TOO_SMALL 
UNSPECIFIED 
Functions 
getDisplayDensity 
Gets display density for the current device.
 Returns number
getMeasureSpecMode 
Gets measure specification mode from a given specification.
| Parameter | Default | Description | 
spec |  | numberThe measure specification.  | 
 Returns number
getMeasureSpecSize 
Gets measure specification size from a given specification.
| Parameter | Default | Description | 
spec |  | numberThe measure specification.  | 
 Returns number
getMode 
Gets layout mode from a given specification as string.
| Parameter | Default | Description | 
mode |  | numberThe measure specification mode.  | 
 Returns string
makeMeasureSpec 
Creates measure specification size from size and mode.
| Parameter | Default | Description | 
px |  | number | 
mode |  | numberThe mode component of measure specification.  | 
 Returns number
measureNativeView 
measureNativeView(
  nativeView: any,
  width: number,
  widthMode: number,
  height: number,
  heightMode: number
): {
  height: number
}Converts device pixels to device independent pixes and measure the nativeView.
Returns the desired size of the nativeView in device pixels.
| Parameter | Default | Description | 
nativeView |  | anythe nativeView to measure (UIView or android.view.View)  | 
width |  | numberthe available width  | 
widthMode |  | numberwidth mode - UNSPECIFIED, EXACTLY or AT_MOST  | 
height |  | numberthe available hegiht  | 
heightMode |  | numberheight mode - UNSPECIFIED, EXACTLY or AT_MOST  | 
 Returns {
  height: number
}
measureSpecToString 
Prints user friendly version of the measureSpec.
| Parameter | Default | Description | 
measureSpec |  | numberthe spec to print  | 
 Returns string
round 
toDeviceIndependentPixels 
- Next
 - AccessibilityEvents