Type

@Stable()
interface Type : Insets

Represents the values for a type of insets, and stores information about the layout insets, animating insets, and visibility of the insets.

WindowInsets.Type instances are commonly stored in a WindowInsets instance.

Types

Companion
Link copied to clipboard
object Companion

Functions

copy
Link copied to clipboard
open fun copy(left: Int = this.left, top: Int = this.top, right: Int = this.right, bottom: Int = this.bottom): Insets
Returns a copy of this instance with the given values.
minus
Link copied to clipboard
open operator fun minus(other: Insets): Insets
plus
Link copied to clipboard
open operator fun plus(other: Insets): Insets

Properties

animatedInsets
Link copied to clipboard
abstract val animatedInsets: Insets
The animated insets for this WindowInsets.Type.
animationFraction
Link copied to clipboard
abstract val animationFraction: Float
The progress of any ongoing animations, in the range of 0 to 1.
animationInProgress
Link copied to clipboard
abstract val animationInProgress: Boolean
Whether this insets type is being animated at this moment.
bottom
Link copied to clipboard
open override val bottom: Int
The bottom dimension of the insets in pixels.
isVisible
Link copied to clipboard
abstract val isVisible: Boolean
Whether the insets are currently visible.
layoutInsets
Link copied to clipboard
abstract val layoutInsets: Insets
The layout insets for this WindowInsets.Type.
left
Link copied to clipboard
open override val left: Int
The left dimension of the insets in pixels.
right
Link copied to clipboard
open override val right: Int
The right dimension of the insets in pixels.
top
Link copied to clipboard
open override val top: Int
The top dimension of the insets in pixels.

Extensions

toPaddingValues
Link copied to clipboard
@Composable()
inline fun WindowInsets.Type.toPaddingValues(start: Boolean = true, top: Boolean = true, end: Boolean = true, bottom: Boolean = true, additionalHorizontal: Dp = 0.dp, additionalVertical: Dp = 0.dp): PaddingValues
Returns the current insets converted into a PaddingValues.
@Composable()
inline fun WindowInsets.Type.toPaddingValues(start: Boolean = true, top: Boolean = true, end: Boolean = true, bottom: Boolean = true, additionalStart: Dp = 0.dp, additionalTop: Dp = 0.dp, additionalEnd: Dp = 0.dp, additionalBottom: Dp = 0.dp): PaddingValues
Returns the current insets converted into a PaddingValues.