Mark
02/15/2025, 8:32 AMisLandscape()
? androidx.compose.material3:material3-window-size-class
or is that overkill?Alex Styl
02/15/2025, 8:56 AMAlex Styl
02/15/2025, 8:57 AMLocalWindowInfo.current.containerSize
to get the width/height of the container u are on (works on all platforms, but android i think)Mark
02/15/2025, 9:01 AMSean Proctor
02/15/2025, 2:56 PMLocalWindowInfo
if you want the window size, or BoxWithConstraints
if you want the usable size. If you really just want to implement isLandscape()
, I think you'll need to do an expect/actual. the desktop version would be something like:
with(LocalWindowInfo.current.containerSize) { width > height }
Mark
02/16/2025, 1:26 AM