diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/layouts/AdaptiveLayoutSnippets.kt b/compose/snippets/src/main/java/com/example/compose/snippets/layouts/AdaptiveLayoutSnippets.kt index 7980eae0..7e5adba9 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/layouts/AdaptiveLayoutSnippets.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/layouts/AdaptiveLayoutSnippets.kt @@ -28,7 +28,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.unit.dp -import androidx.window.core.layout.WindowHeightSizeClass import androidx.window.core.layout.WindowSizeClass /* @@ -52,9 +51,9 @@ fun MyApp( windowSizeClass: WindowSizeClass = currentWindowAdaptiveInfo().windowSizeClass ) { // Perform logic on the size class to decide whether to show the top app bar. - val showTopAppBar = windowSizeClass.windowHeightSizeClass != WindowHeightSizeClass.COMPACT + val showTopAppBar = windowSizeClass.isHeightAtLeastBreakpoint(480) - // 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. MyScreen( showTopAppBar = showTopAppBar, /* ... */