@UnstableApi
class Size


Immutable class for describing width and height dimensions in pixels.

Summary

Constants

const Size!

A static instance to represent an unknown size value.

const Size!

Public constructors

Size(width: Int, height: Int)

Creates a new immutable Size instance.

Public functions

Boolean
equals(obj: Any?)
Int
String!

Public properties

Int
Int

Constants

UNKNOWN

const val UNKNOWNSize!

A static instance to represent an unknown size value.

ZERO

const val ZEROSize!

Public constructors

Size

Size(width: Int, height: Int)

Creates a new immutable Size instance.

Parameters
width: Int

The width of the size, in pixels, or LENGTH_UNSET if unknown.

height: Int

The height of the size, in pixels, or LENGTH_UNSET if unknown.

Throws
java.lang.IllegalArgumentException

if an invalid width or height is specified.

Public functions

equals

fun equals(obj: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String!

Public properties

height

val heightInt

width

val widthInt