# Print output for @column tags ?>
public
static
final
class
WindowInsets.Builder
extends Object
java.lang.Object | |
↳ | android.view.WindowInsets.Builder |
Builder for WindowInsets.
Public constructors | |
---|---|
Builder()
Creates a builder where all insets are initially consumed. |
|
Builder(WindowInsets insets)
Creates a builder where all insets are initialized from |
Inherited methods | |
---|---|
public Builder ()
Creates a builder where all insets are initially consumed.
public Builder (WindowInsets insets)
Creates a builder where all insets are initialized from WindowInsets
.
Parameters | |
---|---|
insets |
WindowInsets : the instance to initialize from.
This value cannot be null . |
public WindowInsets build ()
Builds a WindowInsets
instance.
Returns | |
---|---|
WindowInsets |
the WindowInsets instance.
This value cannot be null . |
public WindowInsets.Builder setDisplayCutout (DisplayCutout displayCutout)
Sets the display cutout.
Parameters | |
---|---|
displayCutout |
DisplayCutout : the display cutout or null if there is none
This value may be null . |
Returns | |
---|---|
WindowInsets.Builder |
itself |
See also:
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
.
Parameters | |
---|---|
typeMask |
int : The bitmask of InsetsType to set the insets for.
Value is either 0 or a combination of android.view.WindowInsets.Type.STATUS_BARS, android.view.WindowInsets.Type.NAVIGATION_BARS, android.view.WindowInsets.Type.CAPTION_BAR, android.view.WindowInsets.Type.IME, android.view.WindowInsets.Type.WINDOW_DECOR, android.view.WindowInsets.Type.SYSTEM_GESTURES, android.view.WindowInsets.Type.MANDATORY_SYSTEM_GESTURES, android.view.WindowInsets.Type.TAPPABLE_ELEMENT, and android.view.WindowInsets.Type.DISPLAY_CUTOUT |
insets |
Insets : The insets to set.
This value cannot be null . |
Returns | |
---|---|
WindowInsets.Builder |
itself
This value cannot be null . |
See also:
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.
Parameters | |
---|---|
typeMask |
int : The bitmask of InsetsType to set the insets for.
Value is either 0 or a combination of android.view.WindowInsets.Type.STATUS_BARS, android.view.WindowInsets.Type.NAVIGATION_BARS, android.view.WindowInsets.Type.CAPTION_BAR, android.view.WindowInsets.Type.IME, android.view.WindowInsets.Type.WINDOW_DECOR, android.view.WindowInsets.Type.SYSTEM_GESTURES, android.view.WindowInsets.Type.MANDATORY_SYSTEM_GESTURES, android.view.WindowInsets.Type.TAPPABLE_ELEMENT, and android.view.WindowInsets.Type.DISPLAY_CUTOUT |
insets |
Insets : The insets to set.
This value cannot be null . |
Returns | |
---|---|
WindowInsets.Builder |
itself
This value cannot be null . |
Throws | |
---|---|
IllegalArgumentException |
If typeMask contains Type#ime() . Maximum
insets are not available for this type as the height of
the IME is dynamic depending on the EditorInfo
of the currently focused view, as well as the UI
state of the IME. |
public WindowInsets.Builder setMandatorySystemGestureInsets (Insets insets)
This method is deprecated.
Use setInsets(int, android.graphics.Insets)
with
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
,
mandatory system gestures cannot be overriden by
View#setSystemGestureExclusionRects
.
Parameters | |
---|---|
insets |
Insets : This value cannot be null . |
Returns | |
---|---|
WindowInsets.Builder |
itself
This value cannot be null . |
public WindowInsets.Builder setStableInsets (Insets stableInsets)
This method is deprecated.
Use setInsetsIgnoringVisibility(int, android.graphics.Insets)
with
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.
Parameters | |
---|---|
stableInsets |
Insets : This value cannot be null . |
Returns | |
---|---|
WindowInsets.Builder |
itself
This value cannot be null . |
See also:
public WindowInsets.Builder setSystemGestureInsets (Insets insets)
This method is deprecated.
Use setInsets(int, android.graphics.Insets)
with 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.
Parameters | |
---|---|
insets |
Insets : This value cannot be null . |
Returns | |
---|---|
WindowInsets.Builder |
itself
This value cannot be null . |
See also:
public WindowInsets.Builder setSystemWindowInsets (Insets systemWindowInsets)
This method is deprecated.
Use setInsets(int, android.graphics.Insets)
with 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.
Parameters | |
---|---|
systemWindowInsets |
Insets : This value cannot be null . |
Returns | |
---|---|
WindowInsets.Builder |
itself
This value cannot be null . |
See also:
public WindowInsets.Builder setTappableElementInsets (Insets insets)
This method is deprecated.
Use setInsets(int, android.graphics.Insets)
with 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.
Parameters | |
---|---|
insets |
Insets : This value cannot be null . |
Returns | |
---|---|
WindowInsets.Builder |
itself
This value cannot be null . |
See also:
public WindowInsets.Builder setVisible (int typeMask, boolean visible)
Sets whether windows that can cause insets are currently visible on screen.
Parameters | |
---|---|
typeMask |
int : The bitmask of InsetsType to set the visibility for.
Value is either 0 or a combination of android.view.WindowInsets.Type.STATUS_BARS, android.view.WindowInsets.Type.NAVIGATION_BARS, android.view.WindowInsets.Type.CAPTION_BAR, android.view.WindowInsets.Type.IME, android.view.WindowInsets.Type.WINDOW_DECOR, android.view.WindowInsets.Type.SYSTEM_GESTURES, android.view.WindowInsets.Type.MANDATORY_SYSTEM_GESTURES, android.view.WindowInsets.Type.TAPPABLE_ELEMENT, and android.view.WindowInsets.Type.DISPLAY_CUTOUT |
visible |
boolean : Whether to mark the windows as visible or not. |
Returns | |
---|---|
WindowInsets.Builder |
itself
This value cannot be null . |
See also: