Insets

class Insets(source)

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.

Properties

Link copied to clipboard
val bottom: Int
Link copied to clipboard
val left: Int
Link copied to clipboard
Link copied to clipboard
val right: Int
Link copied to clipboard
val top: Int

Functions

Link copied to clipboard
open fun add(@NonNull a: Insets, @NonNull b: Insets): Insets
Add two Insets.
Link copied to clipboard
open fun equals(o: Any): Boolean
Two Insets instances are equal if they belong to the same class and their fields are pairwise equal.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun max(@NonNull a: Insets, @NonNull b: Insets): Insets
Returns the component-wise maximum of two Insets.
Link copied to clipboard
open fun min(@NonNull a: Insets, @NonNull b: Insets): Insets
Returns the component-wise minimum of two Insets.
Link copied to clipboard
open fun of(@NonNull r: Rect): Insets
open fun of(left: Int, top: Int, right: Int, bottom: Int): Insets
Return an Insets instance with the appropriate values.
Link copied to clipboard
Subtract two Insets.
Link copied to clipboard
@RequiresApi(api = 29)
open fun toCompatInsets(@NonNull insets: Insets): Insets
Return a copy of the given android.graphics.Insets instance, converted to be an Insets instance from AndroidX.
Link copied to clipboard
@RequiresApi(value = 29)
open fun toPlatformInsets(): Insets
Return a copy this instance, converted to be an android.graphics.Insets instance from the platform.
Link copied to clipboard
open fun toString(): String
Link copied to clipboard