We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41b6a64 commit cf37677Copy full SHA for cf37677
compose/snippets/src/main/java/com/example/compose/snippets/layouts/AdaptiveLayoutSnippets.kt
@@ -52,9 +52,9 @@ fun MyApp(
52
windowSizeClass: WindowSizeClass = currentWindowAdaptiveInfo().windowSizeClass
53
) {
54
// Perform logic on the size class to decide whether to show the top app bar.
55
- val showTopAppBar = windowSizeClass.windowHeightSizeClass != WindowHeightSizeClass.COMPACT
+ val showTopAppBar = windowSizeClass.isHeightAtLeastBreakpoint(480)
56
57
- // MyScreen knows nothing about window sizes, and performs logic based on a Boolean flag.
+ // MyScreen knows nothing about window sizes, and performs logic based on a boolean flag.
58
MyScreen(
59
showTopAppBar = showTopAppBar,
60
/* ... */
0 commit comments