Package-level declarations
Types
Definition of the window size to be on the global scope.
Defines the current orientation of the window.
Window size are a set of opinionated viewport breakpoints to design, develop, and test responsive application layouts against. For more details check Support different screen sizes documentation.
Breakpoints defines the screen type at which a layout will adapt to best fit content and conform to responsive layout requirements. A breakpoint range informs how a screen adjusts to fit its size and orientation.
Properties
Returns a dp size of the hinge according to the window orientation from a FoldingFeature.
Returns a dp size of the hinge from a FoldingFeature.
Returns a height dp size of the hinge from a FoldingFeature.
Returns a width Dp size of the hinge from a FoldingFeature.
Returns a width pixel size of the hinge from a FoldingFeature.
Returns a pixel size of the hinge from a FoldingFeature.
Returns a height dp size of the hinge from a FoldingFeature.
Returns a width Dp size of the hinge from a FoldingFeature.
Returns a width pixel size of the hinge from a FoldingFeature.
Returns whether a FoldingFeature is the book mode.
Returns whether the state of a FoldingFeature is flat.
Returns whether the state of a FoldingFeature is half-opened.
Returns whether the orientation of a FoldingFeature is horizontal.
Is landscape mode enabled.
Calculates if a FoldingFeature should be thought of as splitting the window into multiple physical areas that can be seen by users as logically separate. Display panels connected by a hinge are always separated. Folds on flexible screens should be treated as separating when they are not FoldingFeature.State.FLAT.
Returns whether a FoldingFeature is the table-top mode.
Returns whether the orientation of a FoldingFeature is vertical.
Calculates the occlusion mode to determine if a FoldingFeature occludes a part of the window. This flag is useful for determining if UI elements need to be moved around so that the user can access them. For some devices occluded elements can not be accessed by the user at all.
Returns FoldingFeature.Orientation.HORIZONTAL if the width is greater than the height, FoldingFeature.Orientation.VERTICAL otherwise.
Returns a Flow of the Posture by tracking the WindowLayoutInfo.
Returns a State of the Posture by tracking the WindowLayoutInfo.
Returns the FoldingFeature.State for the FoldingFeature.
Returns a Flow of the WindowLayoutInfo.
Returns a State of the WindowLayoutInfo.
Returns WindowOrientation according to the current window orientation.
Functions
Finds a FoldingFeature from a WindowLayoutInfo.
Finds a FoldingFeature from a list of DisplayFeature.
Returns a Flow of the Posture by tracking the WindowLayoutInfo.
Remembers the WindowSize class for the window corresponding to the current window metrics.
Returns a Posture which represent the current posture of the foldable device.
Returns a Size spec from a FoldingFeature.
Returns a State of the WindowLayoutInfo.