Source set: Android
val screenWidthPx =
with(LocalDensity.current) { LocalConfiguration.current.screenWidthDp.dp.toPx() }CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Robomori
Run Android emulators and devices outside Android Studio.
val screenWidthPx =
with(LocalDensity.current) { LocalConfiguration.current.screenWidthDp.dp.toPx() }Content updated: