java.lang.Object | |
↳ | android.view.WindowInsets |
Describes a set of insets for window content.
WindowInsets are immutable and may be expanded to include more inset types in the future. To adjust insets, use one of the supplied clone methods to obtain a new WindowInsets instance with the adjusted properties.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a new WindowInsets, copying all values from a source WindowInsets.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a copy of this WindowInsets with the stable insets fully consumed.
| |||||||||||
Returns a copy of this WindowInsets with the system window insets fully consumed.
| |||||||||||
Returns the bottom stable inset in pixels.
| |||||||||||
Returns the left stable inset in pixels.
| |||||||||||
Returns the right stable inset in pixels.
| |||||||||||
Returns the top stable inset in pixels.
| |||||||||||
Returns the bottom system window inset in pixels.
| |||||||||||
Returns the left system window inset in pixels.
| |||||||||||
Returns the right system window inset in pixels.
| |||||||||||
Returns the top system window inset in pixels.
| |||||||||||
Returns true if this WindowInsets has any nonzero insets.
| |||||||||||
Returns true if this WindowInsets has nonzero stable insets.
| |||||||||||
Returns true if this WindowInsets has nonzero system window insets.
| |||||||||||
Check if these insets have been fully consumed.
| |||||||||||
Returns true if the associated window has a round shape.
| |||||||||||
Returns a copy of this WindowInsets with selected system window insets replaced
with new values.
| |||||||||||
Returns a copy of this WindowInsets with selected system window insets replaced
with new values.
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Construct a new WindowInsets, copying all values from a source WindowInsets.
src | Source to copy insets from |
---|
Returns a copy of this WindowInsets with the stable insets fully consumed.
Returns a copy of this WindowInsets with the system window insets fully consumed.
Returns the bottom stable inset 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.
Returns the left stable inset 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.
Returns the right stable inset 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.
Returns the top stable inset 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.
Returns the bottom system window inset 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 the left system window inset 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 the right system window inset 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 the top system window inset 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 true if this WindowInsets has any nonzero insets.
Returns true if this WindowInsets has nonzero stable insets.
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.
Returns true if this WindowInsets has nonzero system window insets.
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.
Check if these insets have been fully consumed.
Insets are considered "consumed" if the applicable consume*
methods
have been called such that all insets have been set to zero. This affects propagation of
insets through the view hierarchy; insets that have not been fully consumed will continue
to propagate down to child views.
The result of this method is equivalent to the return value of
fitSystemWindows(android.graphics.Rect)
.
Returns true if the associated window has a round shape.
A round window's left, top, right and bottom edges reach all the way to the associated edges of the window but the corners may not be visible. Views responding to round insets should take care to not lay out critical elements within the corners where they may not be accessible.
Returns a copy of this WindowInsets with selected system window insets replaced with new values.
systemWindowInsets | New system window insets. Each field is the inset in pixels for that edge |
---|
Returns a copy of this WindowInsets with selected system window insets replaced with new values.
left | New left inset in pixels |
---|---|
top | New top inset in pixels |
right | New right inset in pixels |
bottom | New bottom inset in pixels |
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.