<div class='type'>Composable Function</div>


<a id='references'></a>



<h2 id="calculatewindowsizeclass-activity">calculateWindowSizeClass</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
@ExperimentalMaterial3WindowSizeClassApi
@Composable
fun calculateWindowSizeClass(activity: Activity): WindowSizeClass
```


Calculates the window's `WindowSizeClass` for the provided `activity`.

A new `WindowSizeClass` will be returned whenever a configuration change causes the width or
height of the window to cross a breakpoint, such as when the device is rotated or the window is
resized.