measureWithAspectRatio

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. This version of measureWithAspectRatio will respect the intrinsic size of the component being measured.

Parameters

widthSpec

A SizeSpec for the width

heightSpec

A SizeSpec for the height

intrinsicWidth

A pixel value for the intrinsic width of the measured component

intrinsicHeight

A pixel value for the intrinsic height of the measured component

aspectRatio

The aspect ratio size against

outputSize

The output size of this measurement


fun measureWithAspectRatio(widthSpec: Int, heightSpec: Int, aspectRatio: Float, outputSize: Size)

Measure according to an aspect ratio an width and height constraints.

Parameters

widthSpec

A SizeSpec for the width

heightSpec

A SizeSpec for the height

aspectRatio

The aspect ratio size against

outputSize

The output size of this measurement