Hi everyone! I have a question: Which is the best ...
# compose
c
Hi everyone! I have a question: Which is the best way to manage with compose all the variation that I can have in one screen? I mean, how to manage
portrait - landscape
/
mobiles - tablet
The typical example with List-Detail (Navigation on phone, same screen in Tablet)
1
👀 1
⚠️ this was my very first compose app so I guess there are a lot of mistakes 😉 That being said, the rough idea is here I think. I think you should rely on
LocalXxx
API instead of bool resources using Android resource qualifier and/or maybe
withConstaints
r
This is something I'm tackling on a project that supports tablet, phone and foldables. My solution was to use a sealed class to hold the different UI modes my app can be in and like Olivier mentioned, add the mode to a CompositionLocal
👍 1