WindowState



A state object that can be hoisted to control and observe window attributes (size/position/state).

Summary

Public properties

Boolean

true if the window is minimized.

android
WindowPlacement

Describes how the window is placed on the screen.

android
WindowPosition

The current position of the window.

android
DpSize

The current size of the window.

android

Public properties

isMinimized

var isMinimizedBoolean

true if the window is minimized.

placement

var placementWindowPlacement

Describes how the window is placed on the screen.

position

var positionWindowPosition

The current position of the window. If the position is not specified (WindowPosition.isSpecified is false), the position will be set to absolute values WindowPosition.Absolute when the window appears on the screen.

size

var sizeDpSize

The current size of the window.

If the size is not specified (DpSize.width.isSpecified or DpSize.height.isSpecified is false), the size will be set to absolute values (Dp.isSpecified is true) when the window appears on the screen.

Unspecified can be only width, only height, or both. If, for example, window contains some text and we use size=DpSize(300.dp, Dp.Unspecified) then the width will be exactly 300.dp, but the height will be such that all the text will fit.