WindowMetrics
class WindowMetrics
Metrics about a android.view.Window, consisting of its bounds.
This is obtained from WindowMetricsCalculator.computeCurrentWindowMetrics or WindowMetricsCalculator.computeMaximumWindowMetrics.
| See also | |
|---|---|
WindowMetricsCalculator |
Summary
Public properties |
|
|---|---|
Rect |
Returns a new |
Float |
Returns the logical density of the display this window is in. |
Float |
Returns the height of the |
Float |
Returns the width of the |
Public functions
Public properties
bounds
val bounds: Rect
Returns a new Rect describing the bounds of the area the window occupies.
Note that the size of the reported bounds can have different size than android.view.Display.getSize. This method reports the window size including insets from all system decorations, while android.view.Display.getSize reports the area excluding navigation bars and display cutout areas.
| Returns | |
|---|---|
Rect |
window bounds in pixels. |
density
val density: Float
Returns the logical density of the display this window is in.
| See also | |
|---|---|
density |