Summary
In this chapter, you learned how to use Window Size Classes, Jetpack WindowManager, and Canonical Layouts to make sure your app looks great on smartphones, tablets, and foldable devices. First, we investigated how screen sizes, form factors, and hardware features influence app layout. Then, I explained how Window Size Classes help structure your UI, and how you can compute them during runtime.
The second main section, Using Jetpack WindowManager, explained why relying solely on Window Size Classes is not enough to create awesome layouts for tablets and foldables. You learned how to query hardware features such as hinge orientation and device posture and how this helps fine-tune your UI.
Finally, the Organizing the screen content section introduced a Material Design concept called Canonical Layouts. You learned which Canonical Layouts have been defined so far and in which scenarios they work best.
In the final chapter, Bringing Your Compose UI to Different Platforms...