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
@NonNull
val NONE: @NonNull Insets
Link copied to clipboard
val right: Int
Link copied to clipboard
val top: Int

Functions

Link copied to clipboard
@NonNull
open fun add(@NonNull a: @NonNull Insets, @NonNull b: @NonNull Insets): @NonNull 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
@NonNull
open fun max(@NonNull a: @NonNull Insets, @NonNull b: @NonNull Insets): @NonNull Insets
Returns the component-wise maximum of two Insets.
Link copied to clipboard
@NonNull
open fun min(@NonNull a: @NonNull Insets, @NonNull b: @NonNull Insets): @NonNull Insets
Returns the component-wise minimum of two Insets.
Link copied to clipboard
@NonNull
open fun of(@NonNull r: @NonNull Rect): @NonNull Insets
@NonNull
open fun of(left: Int, top: Int, right: Int, bottom: Int): @NonNull Insets
Return an Insets instance with the appropriate values.
Link copied to clipboard
@NonNull
open fun subtract(@NonNull a: @NonNull Insets, @NonNull b: @NonNull Insets): @NonNull Insets
Subtract two Insets.
Link copied to clipboard
@RequiresApi(api = 29)
@NonNull
open fun toCompatInsets(insets: @NonNull Insets): @NonNull 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(): @NonNull Insets
Return a copy this instance, converted to be an android.graphics.Insets instance from the platform.
Link copied to clipboard
@NonNull
open fun toString(): @NonNull String
Link copied to clipboard
@RequiresApi(api = 29)
@NonNull
open fun wrap(insets: @NonNull Insets): @NonNull Insets