androidx.compose.foundation.layout

In this page, you'll find documentation for types, properties, and functions available in the androidx.compose.foundation.layout package. For example:

If you're looking for guidance instead, check out the following Compose guides:

Interfaces

Arrangement.Horizontal

Used to specify the horizontal arrangement of the layout's children in layouts like Row.

Cmn
Arrangement.HorizontalOrVertical

Used to specify the horizontal arrangement of the layout's children in horizontal layouts like Row, or the vertical arrangement of the layout's children in vertical layouts like Column.

Cmn
Arrangement.Vertical

Used to specify the vertical arrangement of the layout's children in layouts like Column.

Cmn
BoxScope

A BoxScope provides a scope for the children of Box and BoxWithConstraints.

Cmn
BoxWithConstraintsScope

Receiver scope being used by the children parameter of BoxWithConstraints

Cmn
ColumnScope

Scope for the children of Column.

Cmn
ContextualFlowColumnOverflowScope

This interface is deprecated. ContextualFlowLayouts are no longer maintained

Cmn
ContextualFlowColumnScope

This interface is deprecated. ContextualFlowLayouts are no longer maintained

Cmn
ContextualFlowRowOverflowScope

This interface is deprecated. ContextualFlowLayouts are no longer maintained

Cmn
ContextualFlowRowScope

This interface is deprecated. ContextualFlowLayouts are no longer maintained

Cmn
FlexBoxConfig

Represents a configuration for a FlexBox container.

Cmn
FlexBoxConfigScope

Receiver scope for configuring FlexBox container properties.

Cmn
FlexBoxScope

Scope for the content of a FlexBox.

Cmn
FlexConfig

Represents a configuration for a flex item within a FlexBox.

Cmn
FlexConfigScope

Scope for configuring flex item properties within a FlexBox.

Cmn
FlowColumnOverflowScope

Scope for the overflow FlowColumn.

Cmn
FlowColumnScope

Scope for the children of FlowColumn.

Cmn
FlowRowOverflowScope

Scope for the overflow FlowRow.

Cmn
FlowRowScope

Scope for the children of FlowRow.

Cmn
GridConfigurationScope

Scope for configuring the structure of a Grid.

Cmn
GridScope

Scope for the children of Grid.

Cmn
GridTrackSpec

Marker interface to enable vararg usage with GridTrackSize.

Cmn
PaddingValues

Describes a padding to be applied along the edges inside a box.

Cmn
RowScope

Scope for the children of Row.

Cmn
WindowInsets

A representation of window insets that tracks access to enable recomposition, relayout, and redrawing when values change.

Cmn

Classes

ContextualFlowColumnOverflow

This class is deprecated. ContextualFlowLayouts are no longer maintained

Cmn
ContextualFlowRowOverflow

This class is deprecated. ContextualFlowLayouts are no longer maintained

Cmn
FlexAlignContent

Defines how multiple lines are distributed along the cross axis.

Cmn
FlexAlignItems

Defines the default alignment for items along the cross axis within their respective lines.

Cmn
FlexAlignSelf

Defines the cross-axis alignment for a single flex item, overriding the container's FlexAlignItems.

Cmn
FlexBasis

Defines the initial main size of a flex item before free space distribution.

Cmn
FlexDirection

Defines the direction of the main axis in a FlexBox container.

Cmn
FlexJustifyContent

Defines the arrangement of items along the main axis of their respective lines.

Cmn
FlexWrap

Defines whether flex items are forced onto a single line or can wrap onto multiple lines.

Cmn
FlowColumnOverflow

This class is deprecated. FlowLayout overflow is no longer maintained

Cmn
FlowLayoutOverflow

This class is deprecated. FlowLayout overflow is no longer maintained

Cmn
FlowRowOverflow

This class is deprecated. FlowLayout overflow is no longer maintained

Cmn
Fr

Represents a flexible unit used for sizing Grid tracks.

Cmn
GridFlow

Defines the direction in which auto-placed items flow within the grid.

Cmn
GridTrackSize

Defines the size of a track (a row or a column) in a Grid.

Cmn
MutableWindowInsets

A WindowInsets whose values can change without changing the instance.

Cmn
PaddingValues.Absolute

Describes an absolute (RTL unaware) padding to be applied along the edges inside a box.

Cmn
WindowInsetsSides

WindowInsetsSides is used in WindowInsets.only to define which sides of the WindowInsets should apply.

Cmn

Objects

Arrangement

Used to specify the arrangement of the layout's children in layouts like Row or Column in the main axis direction (horizontal and vertical, respectively).

Cmn
Arrangement.Absolute
Cmn
ComposeFoundationLayoutFlags

This is a collection of flags which are used to guard against regressions in some of the "riskier" refactors or new feature support that is added to this module.

Cmn
FlexBoxConfig.Companion
Cmn
WindowInsets.Companion
Cmn

Annotations

Enums

IntrinsicSize

Intrinsic size used in width or height which can refer to width or height.

Cmn

Composables

Box

A box with no content that can participate in layout, drawing, pointer input due to the modifier applied to it.

Cmn
BoxWithConstraints

A composable that defines its own content according to the available space, based on the incoming constraints or the current LayoutDirection.

Cmn
Column

A layout composable that places its children in a vertical sequence.

Cmn
ContextualFlowColumn

ContextualFlowColumn is a specialized version of the FlowColumn layout.

Cmn
ContextualFlowRow

ContextualFlowRow is a specialized version of the FlowRow layout.

Cmn
FlexBox

A layout that aligns its children in a single direction (the main axis) and allows them to wrap onto multiple lines.

Cmn
FlowColumn

FlowColumn is a layout that fills items from top to bottom, and when it runs out of space on the bottom, moves to the next "column" or "line" on the right or left based on ltr or rtl layouts, and then continues filling items from top to bottom.

Cmn
FlowRow

FlowRow is a layout that fills items from left to right (ltr) in LTR layouts or right to left (rtl) in RTL layouts and when it runs out of space, moves to the next "row" or "line" positioned on the bottom, and then continues filling items until the items run out.

Cmn
Grid

A 2D layout composable that arranges children into a grid of rows and columns.

Cmn
Row

A layout composable that places its children in a horizontal sequence.

Cmn
Spacer

Component that represents an empty space layout, whose size can be defined using Modifier.width, Modifier.height and Modifier.size modifiers.

Cmn
asPaddingValues

Convert a WindowInsets to a PaddingValues and uses LocalDensity for DP to pixel conversion.

Cmn

Modifiers

absoluteOffset

Offset the content by offset px.

Cmn
absolutePadding

Apply additional space along each edge of the content in Dp: left, top, right and bottom.

Cmn
aspectRatio

Attempts to size the content to match a specified aspect ratio by trying to match one of the incoming constraints in the following order: Constraints.maxWidth, Constraints.maxHeight, Constraints.minWidth, Constraints.minHeight if matchHeightConstraintsFirst is false (which is the default), or Constraints.maxHeight, Constraints.maxWidth, Constraints.minHeight, Constraints.minWidth if matchHeightConstraintsFirst is true.

Cmn
captionBarPadding

Adds padding to accommodate the caption bar insets.

Cmn
android
consumeWindowInsets

Consume insets that haven't been consumed yet by other insets Modifiers similar to windowInsetsPadding without adding any padding.

Cmn
defaultMinSize

Constrain the size of the wrapped layout only when it would be otherwise unconstrained: the minWidth and minHeight constraints are only applied when the incoming corresponding constraint is 0.

Cmn
displayCutoutPadding

Adds padding to accommodate the display cutout.

Cmn
android
fillMaxHeight

Have the content fill (possibly only partially) the Constraints.maxHeight of the incoming measurement constraints, by setting the minimum height and the maximum height to be equal to the maximum height multiplied by fraction.

Cmn
fillMaxSize

Have the content fill (possibly only partially) the Constraints.maxWidth and Constraints.maxHeight of the incoming measurement constraints, by setting the minimum width and the maximum width to be equal to the maximum width multiplied by fraction, as well as the minimum height and the maximum height to be equal to the maximum height multiplied by fraction.

Cmn
fillMaxWidth

Have the content fill (possibly only partially) the Constraints.maxWidth of the incoming measurement constraints, by setting the minimum width and the maximum width to be equal to the maximum width multiplied by fraction.

Cmn
fitInside

Fits the contents within rulers.

Cmn
fitOutside

If one of the Rulers in rulers has a value within the bounds of the Layout, this sizes the content to that Ruler and the edge.

Cmn
height

Declare the preferred height of the content to be exactly heightdp.

Cmn
heightIn

Constrain the height of the content to be between mindp and maxdp as permitted by the incoming measurement Constraints.

Cmn
imeNestedScroll

Controls the soft keyboard as a nested scrolling on Android R and later.

android
imePadding

Adds padding to accommodate the ime insets.

Cmn
android
mandatorySystemGesturesPadding

Adds padding to accommodate the mandatory system gestures insets.

Cmn
android
navigationBarsPadding

Adds padding to accommodate the navigation bars insets.

Cmn
android
offset

Offset the content by offset px.

Cmn
onConsumedWindowInsetsChanged

Calls block with the WindowInsets that have been consumed, either by consumeWindowInsets or one of the padding Modifiers, such as imePadding.

Cmn
padding

Apply all dp of additional space along each edge of the content, left, top, right and bottom.

Cmn
paddingFrom

A Modifier that can add padding to position the content according to specified distances from its bounds to an alignment line.

Cmn
paddingFromBaseline

A Modifier that positions the content in a layout such that the distance from the top of the layout to the baseline of the first line of text in the content is top, and the distance from the baseline of the last line of text in the content to the bottom of the layout is bottom.

Cmn
recalculateWindowInsets

This recalculates the WindowInsets based on the size and position.

Cmn
requiredHeight

Declare the height of the content to be exactly heightdp.

Cmn
requiredHeightIn

Constrain the height of the content to be between mindp and maxdp.

Cmn
requiredSize

Declare the size of the content to be exactly sizedp width and height.

Cmn
requiredSizeIn

Constrain the width of the content to be between minWidthdp and maxWidthdp, and the height of the content to be between minHeightdp and maxHeightdp.

Cmn
requiredWidth

Declare the width of the content to be exactly the same as the min or max intrinsic width of the content.

Cmn
requiredWidthIn

Constrain the width of the content to be between mindp and maxdp.

Cmn
safeContentPadding

Adds padding to accommodate the safe content insets.

Cmn
android
safeDrawingPadding

Adds padding to accommodate the safe drawing insets.

Cmn
android
safeGesturesPadding

Adds padding to accommodate the safe gestures insets.

Cmn
android
size

Declare the preferred size of the content to be exactly sizedp square.

Cmn
sizeIn

Constrain the width of the content to be between minWidthdp and maxWidthdp and the height of the content to be between minHeightdp and maxHeightdp as permitted by the incoming measurement Constraints.

Cmn
statusBarsPadding

Adds padding to accommodate the status bars insets.

Cmn
android
systemBarsPadding

Adds padding to accommodate the system bars insets.

Cmn
android
systemGesturesPadding

Adds padding to accommodate the system gestures insets.

Cmn
android
visible

A Modifier that controls the visibility of the Layout it is applied to.

Cmn
waterfallPadding

Adds padding to accommodate the waterfall insets.

Cmn
android
width

Declare the preferred width of the content to be the same as the min or max intrinsic width of the content.

Cmn
widthIn

Constrain the width of the content to be between mindp and maxdp as permitted by the incoming measurement Constraints.

Cmn
windowInsetsBottomHeight

Sets the height to that of insets at the bottom of the screen.

Cmn
windowInsetsEndWidth

Sets the width to that of insets at the end of the screen, using either left or right, depending on the LayoutDirection.

Cmn
windowInsetsPadding

Adds padding so that the content doesn't enter insets space.

Cmn
windowInsetsStartWidth

Sets the width to that of insets at the start of the screen, using either left or right, depending on the LayoutDirection.

Cmn
windowInsetsTopHeight

Sets the height to that of insets at the top of the screen.

Cmn
wrapContentHeight

Allow the content to measure at its desired height without regard for the incoming measurement minimum height constraint, and, if unbounded is true, also without regard for the incoming measurement maximum height constraint.

Cmn
wrapContentSize

Allow the content to measure at its desired size without regard for the incoming measurement minimum width or minimum height constraints, and, if unbounded is true, also without regard for the incoming maximum constraints.

Cmn
wrapContentWidth

Allow the content to measure at its desired width without regard for the incoming measurement minimum width constraint, and, if unbounded is true, also without regard for the incoming measurement maximum width constraint.

Cmn

Top-level functions summary

PaddingValues

Creates a padding of all dp along all 4 edges.

Cmn
PaddingValues
PaddingValues(horizontal: Dp, vertical: Dp)

Creates a padding of horizontal dp along the left and right edges, and of vertical dp along the top and bottom edges.

Cmn
PaddingValues
PaddingValues(start: Dp, top: Dp, end: Dp, bottom: Dp)

Creates a padding to be applied along the edges inside a box.

Cmn
WindowInsets

Create a WindowInsets with fixed dimensions of 0 on all sides.

Cmn
WindowInsets
WindowInsets(left: Dp, top: Dp, right: Dp, bottom: Dp)

Create a WindowInsets with fixed dimensions, using Dp values.

Cmn
WindowInsets
WindowInsets(left: Int, top: Int, right: Int, bottom: Int)

Create a WindowInsets with fixed dimensions.

Cmn

Extension functions summary

WindowInsets

Returns a WindowInsets that has values of this, added to the values of insets.

Cmn
PaddingValues

Convert a WindowInsets to a PaddingValues and uses density for DP to pixel conversion.

Cmn
Dp

The padding to be applied along the end edge inside a box: along the right edge if the layout direction is LTR, or along the left edge for RTL.

Cmn
Dp

The padding to be applied along the start edge inside a box: along the left edge if the layout direction is LTR, or along the right edge for RTL.

Cmn
Unit

Adds multiple columns with the specified specs.

Cmn
WindowInsets

Returns the values in this WindowInsets that are not also in insets.

Cmn
operator PaddingValues

Subtracts a PaddingValues from another one and ensures that the result is non-negative.

Cmn
WindowInsets

Returns a WindowInsets that eliminates all dimensions except the ones that are enabled.

Cmn
operator PaddingValues

Adds two PaddingValues together.

Cmn
Unit

Adds multiple rows with the specified specs.

Cmn
WindowInsets

Returns a WindowInsets that has the maximum values of this WindowInsets and insets.

Cmn

Extension properties summary

Boolean

true when the navigationBars are being displayed, irrespective of whether they intersects with the Window.

android
Boolean

true when the statusBars are being displayed, irrespective of whether they intersects with the Window.

android
Boolean

true when the systemBars are being displayed, irrespective of whether they intersects with the Window.

android
WindowInsets

An insets type representing the window of a caption bar.

Cmn
android
WindowInsets

The insets that the WindowInsetsCompat.Type.captionBar will consume if shown.

android
Boolean

Indicates whether access to WindowInsets within the content should consume the Android android.view.WindowInsets.

android
Path?

The path for the cutout, if any.

Cmn
android
WindowInsets

This WindowInsets represents the area with the display cutout (e.g. for camera).

Cmn
android
WindowInsets

An insets type representing the window of the software keyboard.

Cmn
android
WindowInsets

The WindowInsets for the IME before the IME started animating in.

android
WindowInsets

The WindowInsets for the IME when the animation completes, if it is allowed to complete successfully.

android
Boolean

true when the caption bar is being displayed, irrespective of whether it intersects with the Window.

android
Boolean

true when the soft keyboard is being displayed, irrespective of whether it intersects with the Window.

android
Boolean

true when the tappableElement is being displayed, irrespective of whether they intersects with the Window.

android
WindowInsets

These insets represent the space where system gestures have priority over application gestures.

Cmn
android
WindowInsets

These insets represent where system UI places navigation bars.

Cmn
android
WindowInsets

The insets that WindowInsetsCompat.Type.navigationBars will consume if shown.

android
WindowInsets

The insets that include all areas that may be drawn over or have gesture confusion, including everything in safeDrawing and safeGestures.

Cmn
android
WindowInsets

The insets that include areas where content may be covered by other drawn content.

Cmn
android
WindowInsets

The insets that include areas where gestures may be confused with other input, including systemGestures, mandatorySystemGestures, waterfall, and tappableElement.

Cmn
android
WindowInsets

These insets represent status bar.

Cmn
android
WindowInsets

The insets that WindowInsetsCompat.Type.statusBars will consume if shown.

android
WindowInsets

These insets represent all system bars.

Cmn
android
WindowInsets

The insets that WindowInsetsCompat.Type.systemBars will consume if shown.

android
WindowInsets

The systemGestures insets represent the area of a window where system gestures have priority and may consume some or all touch input, e.g. due to the system bar occupying it, or it being reserved for touch-only gestures.

Cmn
android
WindowInsets

Returns the tappable element insets.

Cmn
android
WindowInsets

The insets that WindowInsetsCompat.Type.tappableElement will consume if active.

android
WindowInsets

The insets for the curved areas in a waterfall display.

Cmn
android

Top-level functions

fun PaddingValues(all: Dp): PaddingValues

Creates a padding of all dp along all 4 edges.

fun PaddingValues(horizontal: Dp = 0.dp, vertical: Dp = 0.dp): PaddingValues

Creates a padding of horizontal dp along the left and right edges, and of vertical dp along the top and bottom edges.

fun PaddingValues(start: Dp = 0.dp, top: Dp = 0.dp, end: Dp = 0.dp, bottom: Dp = 0.dp): PaddingValues

Creates a padding to be applied along the edges inside a box. In LTR contexts start will be applied along the left edge and end will be applied along the right edge. In RTL contexts, start will correspond to the right edge and end to the left.

fun WindowInsets(): WindowInsets

Create a WindowInsets with fixed dimensions of 0 on all sides.

fun WindowInsets(left: Dp = 0.dp, top: Dp = 0.dp, right: Dp = 0.dp, bottom: Dp = 0.dp): WindowInsets

Create a WindowInsets with fixed dimensions, using Dp values.

import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.layout.union
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.core.view.WindowCompat

class SampleActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        WindowCompat.setDecorFitsSystemWindows(window, false)
        super.onCreate(savedInstanceState)
        setContent {
            // Make sure we are at least 10 DP away from the top.
            val insets = WindowInsets.statusBars.union(WindowInsets(top = 10.dp))
            Box(Modifier.windowInsetsPadding(insets)) {
                // app content
            }
        }
    }
}
fun WindowInsets(left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0): WindowInsets

Create a WindowInsets with fixed dimensions.

import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.layout.union
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.ui.Modifier
import androidx.core.view.WindowCompat

class SampleActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        WindowCompat.setDecorFitsSystemWindows(window, false)
        super.onCreate(savedInstanceState)
        setContent {
            // Make sure we are at least 10 pixels away from the top.
            val insets = WindowInsets.statusBars.union(WindowInsets(top = 10))
            Box(Modifier.windowInsetsPadding(insets)) {
                // app content
            }
        }
    }
}

Extension functions

WindowInsets.add

fun WindowInsets.add(insets: WindowInsets): WindowInsets

Returns a WindowInsets that has values of this, added to the values of insets. For example, if this has a top of 10 and insets has a top of 5, the returned WindowInsets will have a top of 15.

WindowInsets.asPaddingValues

fun WindowInsets.asPaddingValues(density: Density): PaddingValues

Convert a WindowInsets to a PaddingValues and uses density for DP to pixel conversion. PaddingValues can be passed to some containers to pad internal content so that it doesn't overlap the insets when fully scrolled. Ensure that the insets are consumed after the padding is applied if insets are to be used further down the hierarchy.

import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.lazy.LazyColumn
import androidx.core.view.WindowCompat

class SampleActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        WindowCompat.setDecorFitsSystemWindows(window, false)
        super.onCreate(savedInstanceState)
        setContent {
            LazyColumn(contentPadding = WindowInsets.navigationBars.asPaddingValues()) {
                // items
            }
        }
    }
}

PaddingValues.calculateEndPadding

fun PaddingValues.calculateEndPadding(layoutDirection: LayoutDirection): Dp

The padding to be applied along the end edge inside a box: along the right edge if the layout direction is LTR, or along the left edge for RTL.

PaddingValues.calculateStartPadding

fun PaddingValues.calculateStartPadding(layoutDirection: LayoutDirection): Dp

The padding to be applied along the start edge inside a box: along the left edge if the layout direction is LTR, or along the right edge for RTL.

GridConfigurationScope.columns

@ExperimentalGridApi
fun GridConfigurationScope.columns(vararg specs: GridTrackSpec): Unit

Adds multiple columns with the specified specs.

WindowInsets.exclude

fun WindowInsets.exclude(insets: WindowInsets): WindowInsets

Returns the values in this WindowInsets that are not also in insets. For example, if this WindowInsets has a WindowInsets.getTop value of 10 and insets has a WindowInsets.getTop value of 8, the returned WindowInsets will have a WindowInsets.getTop value of 2.

Negative values are never returned. For example if insets has a WindowInsets.getTop of 10 and this has a WindowInsets.getTop of 0, the returned WindowInsets will have a WindowInsets.getTop value of 0.

PaddingValues.minus

operator fun PaddingValues.minus(other: PaddingValues): PaddingValues

Subtracts a PaddingValues from another one and ensures that the result is non-negative.

WindowInsets.only

fun WindowInsets.only(sides: WindowInsetsSides): WindowInsets

Returns a WindowInsets that eliminates all dimensions except the ones that are enabled. For example, to have a WindowInsets at the bottom of the screen, pass WindowInsetsSides.Bottom.

PaddingValues.plus

operator fun PaddingValues.plus(other: PaddingValues): PaddingValues

Adds two PaddingValues together.

GridConfigurationScope.rows

@ExperimentalGridApi
fun GridConfigurationScope.rows(vararg specs: GridTrackSpec): Unit

Adds multiple rows with the specified specs.

WindowInsets.union

fun WindowInsets.union(insets: WindowInsets): WindowInsets

Returns a WindowInsets that has the maximum values of this WindowInsets and insets.

Extension properties

WindowInsets.Companion.areNavigationBarsVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.areNavigationBarsVisibleBoolean

true when the navigationBars are being displayed, irrespective of whether they intersects with the Window.

WindowInsets.Companion.areStatusBarsVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.areStatusBarsVisibleBoolean

true when the statusBars are being displayed, irrespective of whether they intersects with the Window.

WindowInsets.Companion.areSystemBarsVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.areSystemBarsVisibleBoolean

true when the systemBars are being displayed, irrespective of whether they intersects with the Window.

WindowInsets.Companion.captionBar

val WindowInsets.Companion.captionBarWindowInsets

An insets type representing the window of a caption bar.

WindowInsets.Companion.captionBarIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.captionBarIgnoringVisibilityWindowInsets

The insets that the WindowInsetsCompat.Type.captionBar will consume if shown. If it cannot be shown then this will be empty.

AbstractComposeView.consumeWindowInsets

var AbstractComposeView.consumeWindowInsetsBoolean

Indicates whether access to WindowInsets within the content should consume the Android android.view.WindowInsets. The default value is false, meaning that access to WindowInsets.Companion will not consume all the Android WindowInsets and instead adjust the insets based on the position of child Views.

This property should be set prior to first composition.

WindowInsets.Companion.cutoutPath

val WindowInsets.Companion.cutoutPathPath?

The path for the cutout, if any.

WindowInsets.Companion.displayCutout

val WindowInsets.Companion.displayCutoutWindowInsets

This WindowInsets represents the area with the display cutout (e.g. for camera).

WindowInsets.Companion.ime

val WindowInsets.Companion.imeWindowInsets

An insets type representing the window of the software keyboard.

WindowInsets.Companion.imeAnimationSource

@ExperimentalLayoutApi
val WindowInsets.Companion.imeAnimationSourceWindowInsets

The WindowInsets for the IME before the IME started animating in. The current animated value is WindowInsets.Companion.ime.

This will be the same as imeAnimationTarget when there is no IME animation in progress.

WindowInsets.Companion.imeAnimationTarget

@ExperimentalLayoutApi
val WindowInsets.Companion.imeAnimationTargetWindowInsets

The WindowInsets for the IME when the animation completes, if it is allowed to complete successfully. The current animated value is WindowInsets.Companion.ime.

This will be the same as imeAnimationSource when there is no IME animation in progress.

WindowInsets.Companion.isCaptionBarVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.isCaptionBarVisibleBoolean

true when the caption bar is being displayed, irrespective of whether it intersects with the Window.

WindowInsets.Companion.isImeVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.isImeVisibleBoolean

true when the soft keyboard is being displayed, irrespective of whether it intersects with the Window.

WindowInsets.Companion.isTappableElementVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.isTappableElementVisibleBoolean

true when the tappableElement is being displayed, irrespective of whether they intersects with the Window.

WindowInsets.Companion.mandatorySystemGestures

val WindowInsets.Companion.mandatorySystemGesturesWindowInsets

These insets represent the space where system gestures have priority over application gestures.

WindowInsets.Companion.navigationBars

val WindowInsets.Companion.navigationBarsWindowInsets

These insets represent where system UI places navigation bars. Interactive UI should avoid the navigation bars area.

WindowInsets.Companion.navigationBarsIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.navigationBarsIgnoringVisibilityWindowInsets

The insets that WindowInsetsCompat.Type.navigationBars will consume if shown. These insets represent where system UI places navigation bars. Interactive UI should avoid the navigation bars area. If navigation bars cannot be shown, then this will be empty.

WindowInsets.Companion.safeContent

val WindowInsets.Companion.safeContentWindowInsets

The insets that include all areas that may be drawn over or have gesture confusion, including everything in safeDrawing and safeGestures.

WindowInsets.Companion.safeDrawing

val WindowInsets.Companion.safeDrawingWindowInsets

The insets that include areas where content may be covered by other drawn content. This includes all systemBars, displayCutout, and ime.

WindowInsets.Companion.safeGestures

val WindowInsets.Companion.safeGesturesWindowInsets

The insets that include areas where gestures may be confused with other input, including systemGestures, mandatorySystemGestures, waterfall, and tappableElement.

WindowInsets.Companion.statusBars

val WindowInsets.Companion.statusBarsWindowInsets

These insets represent status bar.

WindowInsets.Companion.statusBarsIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.statusBarsIgnoringVisibilityWindowInsets

The insets that WindowInsetsCompat.Type.statusBars will consume if shown. If the status bar can never be shown, then this will be empty.

WindowInsets.Companion.systemBars

val WindowInsets.Companion.systemBarsWindowInsets

These insets represent all system bars. Includes statusBars, captionBar as well as navigationBars, but not ime.

WindowInsets.Companion.systemBarsIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.systemBarsIgnoringVisibilityWindowInsets

The insets that WindowInsetsCompat.Type.systemBars will consume if shown.

If system bars can never be shown, then this will be empty.

WindowInsets.Companion.systemGestures

val WindowInsets.Companion.systemGesturesWindowInsets

The systemGestures insets represent the area of a window where system gestures have priority and may consume some or all touch input, e.g. due to the system bar occupying it, or it being reserved for touch-only gestures.

WindowInsets.Companion.tappableElement

val WindowInsets.Companion.tappableElementWindowInsets

Returns the tappable element insets.

WindowInsets.Companion.tappableElementIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.tappableElementIgnoringVisibilityWindowInsets

The insets that WindowInsetsCompat.Type.tappableElement will consume if active.

If there are never tappable elements then this is empty.

WindowInsets.Companion.waterfall

val WindowInsets.Companion.waterfallWindowInsets

The insets for the curved areas in a waterfall display.