How would one go about have (1) layout for landscape and another layout for portrait, using jetpack Compose? and by layout I mean the arrangement of the views or elements making up the screen? Thanks
➕ 1
z
Zach Klippenstein (he/him) [MOD]
05/28/2021, 5:07 PM
You can use BoxWithConstraints
m
Martin Cazares
05/28/2021, 5:12 PM
but how about totally different layouts? say I want to have a totally different layout based on orientation or maybe even screen size, one single layout wont suffice it... in the current implementation I could have different xmls in different folders(layout-land/layout-portrait/layout-sw600dp, etc), this solution wouldn't really work for that case 😔
b
Barry Fawthrop
05/28/2021, 5:16 PM
zachklipp, do you know of some tutorials using BoxWithConstraints?