androidMain.ru.alexgladkov.odyssey.compose.helpers.WindowSize.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odyssey-compose Show documentation
Show all versions of odyssey-compose Show documentation
Lightweight multiplatform navigation library (jvm, android, ios)
package ru.alexgladkov.odyssey.compose.helpers
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp
import kotlin.math.roundToInt
@Composable
actual fun extractWindowHeight(): Int {
val density = LocalDensity.current
val configuration = LocalConfiguration.current
return with(density) { configuration.screenHeightDp.dp.toPx().roundToInt() }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy