# WindowInsetsCompat.Builder

# WindowInsetsCompat.Builder

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/view/WindowInsetsCompat.java+class:androidx.core.view.WindowInsetsCompat.Builder)  
Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.Builder "View this page in Java")

<br />

```
class WindowInsetsCompat.Builder
```

<br />

*** ** * ** ***

Builder for[WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat).

## Summary

|                                                                                                                                                                                                              ### Public constructors                                                                                                                                                                                                              |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#Builder())`()` Creates a builder where all insets are initially consumed.                                                                                                                                                                                                                                                                  |
| [Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#Builder(androidx.core.view.WindowInsetsCompat))`(insets: `[WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat)`)` Creates a builder where all insets are initialized from[WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat). |

|                                                    ### Public functions                                                    |
|----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat)                 | [build](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#build())`()` Builds a[WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat)instance.                                                                                                                                                                                                                                                                                                                                                                                                               |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | [setDisplayCutout](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setDisplayCutout(androidx.core.view.DisplayCutoutCompat))`(displayCutout: `[DisplayCutoutCompat](https://developer.android.com/reference/kotlin/androidx/core/view/DisplayCutoutCompat)`?)` Sets the display cutout.                                                                                                                                                                                                                                                                                                                        |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | [setInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsets(int,androidx.core.graphics.Insets))`(typeMask: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, insets: `[Insets](https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets)`)` Sets the insets of a specific window type in pixels.                                                                                                                                                                                                                                                    |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | [setInsetsIgnoringVisibility](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsetsIgnoringVisibility(int,androidx.core.graphics.Insets))`(typeMask: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, insets: `[Insets](https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets)`)` Sets the insets a specific window type in pixels, while ignoring its visibility state.                                                                                                                                                                              |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | ~~[setMandatorySystemGestureInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setMandatorySystemGestureInsets(androidx.core.graphics.Insets))~~`(insets: `[Insets](https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets)`)` **This function is deprecated.** Use[setInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsets(int,androidx.core.graphics.Insets))with[mandatorySystemGestures](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#mandatorySystemGestures()). <br /> |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | [setPrivacyIndicatorBounds](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setPrivacyIndicatorBounds(android.graphics.Rect))`(bounds: `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)`?)` Sets the bounds of the system privacy indicator.                                                                                                                                                                                                                                                                                                                                        |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | [setRoundedCorner](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setRoundedCorner(int,androidx.core.view.RoundedCornerCompat))`(position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, roundedCorner: `[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat)`?)` Sets the rounded corner of given position.                                                                                                                                                                                                         |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | ~~[setStableInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setStableInsets(androidx.core.graphics.Insets))~~`(insets: `[Insets](https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets)`)` **This function is deprecated.** Use[setInsetsIgnoringVisibility](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsetsIgnoringVisibility(int,androidx.core.graphics.Insets))with[systemBars](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#systemBars()). <br />                       |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | ~~[setSystemGestureInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setSystemGestureInsets(androidx.core.graphics.Insets))~~`(insets: `[Insets](https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets)`)` **This function is deprecated.** Use[setInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsets(int,androidx.core.graphics.Insets))with[systemGestures](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#systemGestures()). <br />                                     |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | ~~[setSystemWindowInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setSystemWindowInsets(androidx.core.graphics.Insets))~~`(insets: `[Insets](https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets)`)` **This function is deprecated.** Use[setInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsets(int,androidx.core.graphics.Insets))with[systemBars](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#systemBars()). <br />                                               |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | ~~[setTappableElementInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setTappableElementInsets(androidx.core.graphics.Insets))~~`(insets: `[Insets](https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets)`)` **This function is deprecated.** Use[setInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsets(int,androidx.core.graphics.Insets))with[tappableElement](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#tappableElement()). <br />                               |
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | [setVisible](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setVisible(int,boolean))`(typeMask: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, visible: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Sets whether windows that can cause insets are currently visible on screen.                                                                                                                                                                                                                                                   |

## Public constructors

### Builder

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  

```
Builder()
```

Creates a builder where all insets are initially consumed.  

### Builder

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  

```
Builder(insets: WindowInsetsCompat)
```

Creates a builder where all insets are initialized from[WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat).  

|                                                      Parameters                                                      |
|----------------------------------------------------------------------------------------------------------------------|----------------------------------|
| `insets: `[WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat) | the instance to initialize from. |

## Public functions

### build

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  

```
fun build(): WindowInsetsCompat
```

Builds a[WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat)instance.  

|                                                  Returns                                                   |
|------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|
| [WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat) | the[WindowInsetsCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat)instance. |

### setDisplayCutout

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  

```
fun setDisplayCutout(displayCutout: DisplayCutoutCompat?): WindowInsetsCompat.Builder
```

Sets the display cutout.

The cutout passed will only take effect when running on API 29 and above.  

|                                                            Parameters                                                            |
|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|
| `displayCutout: `[DisplayCutoutCompat](https://developer.android.com/reference/kotlin/androidx/core/view/DisplayCutoutCompat)`?` | the display cutout or null if there is none |

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                          See also                                                           |
|-----------------------------------------------------------------------------------------------------------------------------|---|
| [getDisplayCutout](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getDisplayCutout()) |   |

### setInsets

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
fun setInsets(typeMask: Int, insets: Insets): WindowInsetsCompat.Builder
```

Sets the insets of a specific window type in pixels.

The insets represents the area of a a window that is partially or fully obscured by the system windows identified by`typeMask`.  

|                                            Parameters                                            |
|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| `typeMask: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | The bitmask of[Type](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type)to set the insets for. |
| `insets: `[Insets](https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets) | The insets to set.                                                                                                                    |

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                     See also                                                     |
|------------------------------------------------------------------------------------------------------------------|---|
| [getInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getInsets(int)) |   |

### setInsetsIgnoringVisibility

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
fun setInsetsIgnoringVisibility(typeMask: Int, insets: Insets): WindowInsetsCompat.Builder
```

Sets the insets a specific window type in pixels, while ignoring its visibility state.

The insets represents the area of a a window that that**may** be partially or fully obscured by the system window identified by`typeMask`. This value does not change based on the visibility state of those elements. For example, if the status bar is normally shown, but temporarily hidden, the inset returned here will still provide the inset associated with the status bar being shown.  

|                                            Parameters                                            |
|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| `typeMask: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | The bitmask of[Type](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type)to set the insets for. |
| `insets: `[Insets](https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets) | The insets to set.                                                                                                                    |

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                        Throws                                                         |
|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [java.lang.IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | If`typeMask`contains[ime](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#ime()). Maximum insets are not available for this type as the height of the IME is dynamic depending on the[EditorInfo](https://developer.android.com/reference/android/view/inputmethod/EditorInfo.html)of the currently focused view, as well as the UI state of the IME. |

|                                                                       See also                                                                       |
|------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [getInsetsIgnoringVisibility](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getInsetsIgnoringVisibility(int)) |   |

### setMandatorySystemGestureInsets

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  
Deprecated in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
fun [setMandatorySystemGestureInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setMandatorySystemGestureInsets(androidx.core.graphics.Insets))(insets: Insets): WindowInsetsCompat.Builder
```
| **This function is deprecated.**   
|
| Use[setInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsets(int,androidx.core.graphics.Insets))with[mandatorySystemGestures](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#mandatorySystemGestures()).

Sets mandatory system gesture insets in pixels.

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

In contrast to[regular system gestures](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setSystemGestureInsets(androidx.core.graphics.Insets)),**mandatory** system gestures cannot be overridden by[setSystemGestureExclusionRects](https://developer.android.com/reference/kotlin/androidx/core/view/ViewCompat#setSystemGestureExclusionRects(android.view.View,java.util.List<android.graphics.Rect>)).

The insets passed will only take effect when running on API 29 and above.  

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                                         See also                                                                          |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [getMandatorySystemGestureInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getMandatorySystemGestureInsets()) |   |

### setPrivacyIndicatorBounds

Added in[1.17.0](https://developer.android.com/jetpack/androidx/releases/core#1.17.0)  

```
fun setPrivacyIndicatorBounds(bounds: Rect?): WindowInsetsCompat.Builder
```

Sets the bounds of the system privacy indicator.  

|                                       Parameters                                        |
|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| `bounds: `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)`?` | The bounds of the system privacy indicator, or null if they don't exist or the bounds have been consumed. |

### setRoundedCorner

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
fun setRoundedCorner(position: Int, roundedCorner: RoundedCornerCompat?): WindowInsetsCompat.Builder
```

Sets the rounded corner of given position.  

|                                                            Parameters                                                            |
|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|
| `position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                          | the position of this rounded corner         |
| `roundedCorner: `[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat)`?` | the rounded corner or null if there is none |

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                            See also                                                            |
|--------------------------------------------------------------------------------------------------------------------------------|---|
| [getRoundedCorner](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getRoundedCorner(int)) |   |

### setStableInsets

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  
Deprecated in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
fun [setStableInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setStableInsets(androidx.core.graphics.Insets))(insets: Insets): WindowInsetsCompat.Builder
```
| **This function is deprecated.**   
|
| Use[setInsetsIgnoringVisibility](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsetsIgnoringVisibility(int,androidx.core.graphics.Insets))with[systemBars](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#systemBars()).

Sets the stable insets in pixels.

The stable inset represents the area of a full-screen window that**may**be partially or fully obscured by the system UI elements. This value does not change based on the visibility state of those elements; for example, if the status bar is normally shown, but temporarily hidden, the stable inset will still provide the inset associated with the status bar being shown.

The insets passed will only take effect when running on API 29 and above.  

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                         See also                                                          |
|---------------------------------------------------------------------------------------------------------------------------|---|
| [getStableInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getStableInsets()) |   |

### setSystemGestureInsets

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  
Deprecated in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
fun [setSystemGestureInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setSystemGestureInsets(androidx.core.graphics.Insets))(insets: Insets): WindowInsetsCompat.Builder
```
| **This function is deprecated.**   
|
| Use[setInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsets(int,androidx.core.graphics.Insets))with[systemGestures](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#systemGestures()).

Sets system gesture insets in pixels.

The system gesture 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 a system bar occupying it, or it being reserved for touch-only gestures.

The insets passed will only take effect when running on API 29 and above.  

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                                See also                                                                 |
|-----------------------------------------------------------------------------------------------------------------------------------------|---|
| [getSystemGestureInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getSystemGestureInsets()) |   |

### setSystemWindowInsets

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  
Deprecated in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
fun [setSystemWindowInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setSystemWindowInsets(androidx.core.graphics.Insets))(insets: Insets): WindowInsetsCompat.Builder
```
| **This function is deprecated.**   
|
| Use[setInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsets(int,androidx.core.graphics.Insets))with[systemBars](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#systemBars()).

Sets system window insets in pixels.

The system window inset represents the area of a full-screen window that is partially or fully obscured by the status bar, navigation bar, IME or other system windows.  

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                               See also                                                                |
|---------------------------------------------------------------------------------------------------------------------------------------|---|
| [getSystemWindowInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getSystemWindowInsets()) |   |

### setTappableElementInsets

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  
Deprecated in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
fun [setTappableElementInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setTappableElementInsets(androidx.core.graphics.Insets))(insets: Insets): WindowInsetsCompat.Builder
```
| **This function is deprecated.**   
|
| Use[setInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder#setInsets(int,androidx.core.graphics.Insets))with[tappableElement](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#tappableElement()).

Sets tappable element insets in pixels.

The tappable element insets represent how much tappable elements**must at least**be inset to remain both tappable and visually unobstructed by persistent system windows.

The insets passed will only take effect when running on API 29 and above.  

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                                  See also                                                                   |
|---------------------------------------------------------------------------------------------------------------------------------------------|---|
| [getTappableElementInsets](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getTappableElementInsets()) |   |

### setVisible

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
fun setVisible(typeMask: Int, visible: Boolean): WindowInsetsCompat.Builder
```

Sets whether windows that can cause insets are currently visible on screen.  

|                                           Parameters                                           |
|------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `typeMask: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)        | The bitmask of[Type](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type)to set the visibility for. |
| `visible: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether to mark the windows as visible or not.                                                                                            |

|                                                          Returns                                                           |
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WindowInsetsCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder) | itself |

|                                                     See also                                                     |
|------------------------------------------------------------------------------------------------------------------|---|
| [isVisible](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#isVisible(int)) |   |