Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/view/WindowInsets.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/view/WindowInsets.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/WindowInsets.Builder#inhmethods)

# WindowInsets.Builder

*** ** * ** ***

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


`
public
static
final

class
WindowInsets.Builder
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.WindowInsets.Builder |

<br />

*** ** * ** ***

Builder for WindowInsets.

## Summary

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

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/view/WindowInsets` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#build()() ` Builds a `https://developer.android.com/reference/android/view/WindowInsets` instance. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setBoundingRects(int,%20java.util.List<android.graphics.Rect>)(int typeMask, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect> rects) ` Sets the bounding rects. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setBoundingRectsIgnoringVisibility(int,%20java.util.List<android.graphics.Rect>)(int typeMask, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect> rects) ` Sets the bounding rects while ignoring their visibility state. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setDisplayCutout(android.view.DisplayCutout)(https://developer.android.com/reference/android/view/DisplayCutout displayCutout) ` Sets the display cutout. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setDisplayShape(android.view.DisplayShape)(https://developer.android.com/reference/android/view/DisplayShape displayShape) ` Sets the display shape. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setFrame(int,%20int)(int width, int height) ` Set the frame size. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsets(int,%20android.graphics.Insets)(int typeMask, https://developer.android.com/reference/android/graphics/Insets insets) ` Sets the insets of a specific window type in pixels. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsetsIgnoringVisibility(int,%20android.graphics.Insets)(int typeMask, https://developer.android.com/reference/android/graphics/Insets insets) ` Sets the insets a specific window type in pixels, while ignoring its visibility state. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setMandatorySystemGestureInsets(android.graphics.Insets)(https://developer.android.com/reference/android/graphics/Insets insets) ` *This method was deprecated in API level 30. Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsets(int,%20android.graphics.Insets)` with `https://developer.android.com/reference/android/view/WindowInsets.Type#mandatorySystemGestures()`.* |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setPrivacyIndicatorBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect bounds) ` Sets the bounds of the system privacy indicator. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setRoundedCorner(int,%20android.view.RoundedCorner)(int position, https://developer.android.com/reference/android/view/RoundedCorner roundedCorner) ` Sets the rounded corner of given position. |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setStableInsets(android.graphics.Insets)(https://developer.android.com/reference/android/graphics/Insets stableInsets) ` *This method was deprecated in API level 30. Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsetsIgnoringVisibility(int,%20android.graphics.Insets)` with `https://developer.android.com/reference/android/view/WindowInsets.Type#systemBars()`.* |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setSystemGestureInsets(android.graphics.Insets)(https://developer.android.com/reference/android/graphics/Insets insets) ` *This method was deprecated in API level 30. Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsets(int,%20android.graphics.Insets)` with `https://developer.android.com/reference/android/view/WindowInsets.Type#systemGestures()`.* |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setSystemWindowInsets(android.graphics.Insets)(https://developer.android.com/reference/android/graphics/Insets systemWindowInsets) ` *This method was deprecated in API level 30. Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsets(int,%20android.graphics.Insets)` with `https://developer.android.com/reference/android/view/WindowInsets.Type#systemBars()` or `https://developer.android.com/reference/android/view/WindowInsets.Type#displayCutout()`.* |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setTappableElementInsets(android.graphics.Insets)(https://developer.android.com/reference/android/graphics/Insets insets) ` *This method was deprecated in API level 30. Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsets(int,%20android.graphics.Insets)` with `https://developer.android.com/reference/android/view/WindowInsets.Type#tappableElement()`.* |
| ` https://developer.android.com/reference/android/view/WindowInsets.Builder` | ` https://developer.android.com/reference/android/view/WindowInsets.Builder#setVisible(int,%20boolean)(int typeMask, boolean visible) ` Sets whether windows that can cause insets are currently visible on screen. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public constructors

### Builder

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder ()
```

Creates a builder where all insets are initially consumed.

<br />

### Builder

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder (WindowInsets insets)
```

Creates a builder where all insets are initialized from `https://developer.android.com/reference/android/view/WindowInsets`.

<br />

| Parameters ||
|---|---|
| `insets` | `WindowInsets`: the instance to initialize from. This value cannot be `null`. <br /> |

## Public methods

### build

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets build ()
```

Builds a `https://developer.android.com/reference/android/view/WindowInsets` instance.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets` | the `https://developer.android.com/reference/android/view/WindowInsets` instance. This value cannot be `null`. <br /> |

### setBoundingRects

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setBoundingRects (int typeMask, 
                List<Rect> rects)
```

Sets the bounding rects.

<br />

| Parameters ||
|---|---|
| `typeMask` | `int`: the inset types to which these rects apply. Value is either `0` or a combination of the following: |
| `rects` | `List`: the bounding rects. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

### setBoundingRectsIgnoringVisibility

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setBoundingRectsIgnoringVisibility (int typeMask, 
                List<Rect> rects)
```

Sets the bounding rects while ignoring their visibility state.

<br />

| Parameters ||
|---|---|
| `typeMask` | `int`: the inset types to which these rects apply. Value is either `0` or a combination of the following: |
| `rects` | `List`: the bounding rects. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

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

### setDisplayCutout

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setDisplayCutout (DisplayCutout displayCutout)
```

Sets the display cutout.

<br />

| Parameters ||
|---|---|
| `displayCutout` | `DisplayCutout`: the display cutout or null if there is none <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getDisplayCutout()`

### setDisplayShape

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setDisplayShape (DisplayShape displayShape)
```

Sets the display shape.

<br />

| Parameters ||
|---|---|
| `displayShape` | `DisplayShape`: the display shape. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getDisplayShape()`

### setFrame

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setFrame (int width, 
                int height)
```

Set the frame size.

<br />

| Parameters ||
|---|---|
| `width` | `int`: the width of the frame. <br /> |
| `height` | `int`: the height of the frame. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

### setInsets

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setInsets (int typeMask, 
                Insets insets)
```

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`.

<br />

<br />

| Parameters ||
|---|---|
| `typeMask` | `int`: The bitmask of `https://developer.android.com/reference/android/view/WindowInsets.Type` to set the insets for. Value is either `0` or a combination of the following: |
| `insets` | `Insets`: The insets to set. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getInsets(int)`

### setInsetsIgnoringVisibility

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setInsetsIgnoringVisibility (int typeMask, 
                Insets insets)
```

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 `type`. 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.

<br />

<br />

| Parameters ||
|---|---|
| `typeMask` | `int`: The bitmask of `https://developer.android.com/reference/android/view/WindowInsets.Type` to set the insets for. Value is either `0` or a combination of the following: |
| `insets` | `Insets`: The insets to set. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

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

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getInsetsIgnoringVisibility(int)`

### setMandatorySystemGestureInsets

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setMandatorySystemGestureInsets (Insets insets)
```


**This method was deprecated
in API level 30.**   

Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsets(int,%20android.graphics.Insets)` with
`https://developer.android.com/reference/android/view/WindowInsets.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 `https://developer.android.com/reference/android/view/WindowInsets.Builder#setSystemGestureInsets(android.graphics.Insets)`,
**mandatory** system gestures cannot be overridden by
`https://developer.android.com/reference/android/view/View#setSystemGestureExclusionRects(java.util.List<android.graphics.Rect>)`.

<br />

| Parameters ||
|---|---|
| `insets` | `Insets`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getMandatorySystemGestureInsets()`

### setPrivacyIndicatorBounds

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setPrivacyIndicatorBounds (Rect bounds)
```

Sets the bounds of the system privacy indicator.

<br />

| Parameters ||
|---|---|
| `bounds` | `Rect`: The bounds of the system privacy indicator. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | This value cannot be `null`. <br /> |

### setRoundedCorner

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setRoundedCorner (int position, 
                RoundedCorner roundedCorner)
```

Sets the rounded corner of given position.

<br />

| Parameters ||
|---|---|
| `position` | `int`: the position of this rounded corner. Value is one of the following: - `https://developer.android.com/reference/android/view/RoundedCorner#POSITION_TOP_LEFT` - `https://developer.android.com/reference/android/view/RoundedCorner#POSITION_TOP_RIGHT` - `https://developer.android.com/reference/android/view/RoundedCorner#POSITION_BOTTOM_RIGHT` - `https://developer.android.com/reference/android/view/RoundedCorner#POSITION_BOTTOM_LEFT` |
| `roundedCorner` | `RoundedCorner`: the rounded corner or null if there is none <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getRoundedCorner(int)`

### setStableInsets

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setStableInsets (Insets stableInsets)
```


**This method was deprecated
in API level 30.**   

Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsetsIgnoringVisibility(int,%20android.graphics.Insets)` with
`https://developer.android.com/reference/android/view/WindowInsets.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.

<br />

<br />

| Parameters ||
|---|---|
| `stableInsets` | `Insets`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getStableInsets()`

### setSystemGestureInsets

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setSystemGestureInsets (Insets insets)
```


**This method was deprecated
in API level 30.**   

Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsets(int,%20android.graphics.Insets)` with `https://developer.android.com/reference/android/view/WindowInsets.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.

<br />

| Parameters ||
|---|---|
| `insets` | `Insets`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getSystemGestureInsets()`

### setSystemWindowInsets

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setSystemWindowInsets (Insets systemWindowInsets)
```


**This method was deprecated
in API level 30.**   

Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsets(int,%20android.graphics.Insets)` with `https://developer.android.com/reference/android/view/WindowInsets.Type#systemBars()` or
`https://developer.android.com/reference/android/view/WindowInsets.Type#displayCutout()`.

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.

<br />

<br />

| Parameters ||
|---|---|
| `systemWindowInsets` | `Insets`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getSystemWindowInsets()`

### setTappableElementInsets

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setTappableElementInsets (Insets insets)
```


**This method was deprecated
in API level 30.**   

Use `https://developer.android.com/reference/android/view/WindowInsets.Builder#setInsets(int,%20android.graphics.Insets)` with `https://developer.android.com/reference/android/view/WindowInsets.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.

<br />

| Parameters ||
|---|---|
| `insets` | `Insets`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#getTappableElementInsets()`

### setVisible

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets.Builder setVisible (int typeMask, 
                boolean visible)
```

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

<br />

| Parameters ||
|---|---|
| `typeMask` | `int`: The bitmask of `https://developer.android.com/reference/android/view/WindowInsets.Type` to set the visibility for. Value is either `0` or a combination of the following: |
| `visible` | `boolean`: Whether to mark the windows as visible or not. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets.Builder` | itself. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#isVisible(int)`