Insets

class Insets
kotlin.Any
   ↳ androidx.core.graphics.Insets

An Insets instance holds four integer offsets which describe changes to the four edges of a Rectangle. By convention, positive values move edges towards the centre of the rectangle.

Insets are immutable so may be treated as values.

Summary

Public methods

Boolean
equals(other: Any?)

Two Insets instances are equal iff they belong to the same class and their fields are pairwise equal.

Int

static Insets
of(left: Int, top: Int, right: Int, bottom: Int)

Return an Insets instance with the appropriate values.

static Insets
of(@NonNull r: Rect)

Return an Insets instance with the appropriate values.

String

Properties

static Insets

Int

Int

Int

Int

Public methods

equals

fun equals(other: Any?): Boolean

Two Insets instances are equal iff they belong to the same class and their fields are pairwise equal.

Parameters
o Any?: the object to compare this instance with.
Return
Boolean: true iff this object is equal o

hashCode

fun hashCode(): Int

of

@NonNull static fun of(left: Int, top: Int, right: Int, bottom: Int): Insets

Return an Insets instance with the appropriate values.

Parameters
left Int: the left inset
top Int: the top inset
right Int: the right inset
bottom Int: the bottom inset
Return
Insets: Insets instance with the appropriate values

of

@NonNull static fun of(@NonNull r: Rect): Insets

Return an Insets instance with the appropriate values.

Parameters
r Rect: the rectangle from which to take the values
Return
Insets: an Insets instance with the appropriate values

toString

fun toString(): String

Properties

NONE

@NonNull static val NONE: Insets

bottom

val bottom: Int

left

val left: Int

right

val right: Int

top

val top: Int