MeasureUtils

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun getViewMeasureSpec(sizeSpec: Int): Int
Link copied to clipboard
open fun measureResultUsingAspectRatio(widthSpec: Int, heightSpec: Int, intrinsicWidth: Int, intrinsicHeight: Int, aspectRatio: Float, @Nullable layoutData: Any): MeasureResult
Measure according to an aspect ratio an width and height constraints.
Link copied to clipboard
open fun measureWithAspectRatio(widthSpec: Int, heightSpec: Int, aspectRatio: Float, outputSize: Size)
open fun measureWithAspectRatio(widthSpec: Int, heightSpec: Int, intrinsicWidth: Int, intrinsicHeight: Int, aspectRatio: Float, outputSize: Size)
Measure according to an aspect ratio an width and height constraints.
Link copied to clipboard
open fun measureWithDesiredPx(widthSpec: Int, heightSpec: Int, desiredWidthPx: Int, desiredHeightPx: Int, outputSize: Size)
Set the {@param outputSize} to respect both Specs and the desired width and height.
Link copied to clipboard
open fun measureWithEqualDimens(widthSpec: Int, heightSpec: Int, outputSize: Size)
Set the {@param outputSize} to respect both size specs and try to keep both width and height equal.