Fix WindowSizeClass breakpoint compat

This commit is contained in:
世界
2026-02-03 17:48:06 +08:00
parent 53f130aba2
commit 46d2b6576c
6 changed files with 37 additions and 7 deletions

View File

@@ -0,0 +1,10 @@
package io.nekohasekai.sfa.compat
import androidx.window.core.layout.WindowSizeClass
object WindowSizeClassCompat {
const val WIDTH_DP_MEDIUM_LOWER_BOUND = 600
const val WIDTH_DP_EXPANDED_LOWER_BOUND = 840
}
fun WindowSizeClass.isWidthAtLeastBreakpointCompat(breakpointDp: Int): Boolean = isWidthAtLeastBreakpoint(breakpointDp)