androidx.compose.material3.adaptive
Classes
HingeInfo |
A class that contains the info of a hinge relevant to a |
Cmn
|
Posture |
Posture info that can help make layout adaptation decisions. |
Cmn
|
WindowAdaptiveInfo |
This class collects window info that affects adaptation decisions. |
Cmn
|
Annotations
Top-level functions summary
State<List<FoldingFeature>> |
Collects the current window folding features from |
android
|
WindowAdaptiveInfo |
@ComposableCalculates and returns |
Cmn
|
DpSize |
This function is deprecated. Going to be removed in the next version. |
Cmn
|
IntSize |
This function is deprecated. Prefer LocalWindowInfo instead |
Cmn
|
Extension properties summary
List<Rect> |
Returns the list of all horizontal hinge bounds. |
Cmn
|
List<Rect> |
Returns the list of all vertical hinge bounds. |
Cmn
|
List<Rect> |
Returns the list of horizontal hinge bounds that are occluding. |
Cmn
|
List<Rect> |
Returns the list of vertical hinge bounds that are occluding. |
Cmn
|
List<Rect> |
Returns the list of horizontal hinge bounds that are separating. |
Cmn
|
List<Rect> |
Returns the list of vertical hinge bounds that are separating. |
Cmn
|
Top-level functions
collectFoldingFeaturesAsState
@Composable
fun collectFoldingFeaturesAsState(): State<List<FoldingFeature>>
Collects the current window folding features from WindowInfoTracker in to a State.
| Returns | |
|---|---|
State<List<FoldingFeature>> |
a |
currentWindowAdaptiveInfo
@Composable
fun currentWindowAdaptiveInfo(supportLargeAndXLargeWidth: Boolean = false): WindowAdaptiveInfo
Calculates and returns WindowAdaptiveInfo of the provided context. It's a convenient function that uses the default WindowSizeClass constructor and the default Posture calculation functions to retrieve WindowSizeClass and Posture.
| Parameters | |
|---|---|
supportLargeAndXLargeWidth: Boolean = false |
|
| Returns | |
|---|---|
WindowAdaptiveInfo |
|
currentWindowDpSize
@ExperimentalMaterial3AdaptiveApi
@Composable
funcurrentWindowDpSize(): DpSize
Returns and automatically update the current window size in DpSize.
currentWindowSize
@Composable
funcurrentWindowSize(): IntSize
Returns and automatically update the current window size. It's a convenient function of getting androidx.compose.ui.platform.WindowInfo.containerSize from LocalWindowInfo.
Extension properties
allHorizontalHingeBounds
val Posture.allHorizontalHingeBounds: List<Rect>
Returns the list of all horizontal hinge bounds.
allVerticalHingeBounds
val Posture.allVerticalHingeBounds: List<Rect>
Returns the list of all vertical hinge bounds.
occludingHorizontalHingeBounds
val Posture.occludingHorizontalHingeBounds: List<Rect>
Returns the list of horizontal hinge bounds that are occluding.
occludingVerticalHingeBounds
val Posture.occludingVerticalHingeBounds: List<Rect>
Returns the list of vertical hinge bounds that are occluding.
separatingHorizontalHingeBounds
val Posture.separatingHorizontalHingeBounds: List<Rect>
Returns the list of horizontal hinge bounds that are separating.
separatingVerticalHingeBounds
val Posture.separatingVerticalHingeBounds: List<Rect>
Returns the list of vertical hinge bounds that are separating.