Function

exclude

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

exclude

Source set: Common
public 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.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: