ScaleTypeTransform

Util methods for view size calculations

Functions

Link copied to clipboard

Computes the scale by which a view has to scale in x and y in order to fill its parent while maintaining the buffer's aspect ratio.

Link copied to clipboard

Computes the scale by which a view has to scale in x and y in order to fit its parent while maintaining the buffer's aspect ratio.

Link copied to clipboard

Computes the top left coordinates for the view to be centered inside its parent.

Link copied to clipboard

Computes the rotation of a android.view.View in degrees from its natural orientation.

Link copied to clipboard
fun isNaturalPortrait(context: Context, rotationDegrees: Int): Boolean

Determines whether the current device is a natural portrait-oriented device

Link copied to clipboard

Get the int value degree of a rotation from the Surface constants.