Building adaptive layouts in Modern Android Development
When building the UI for your application in Modern Android Development, it is fair to say that you should consider ensuring the application is responsive to different screen sizes, orientations, and form factors. Finally, developers can now remove the lock in portrait mode. In this recipe, we will utilize ideas we learned from previous recipes and build an adaptive app for different screen sizes and orientations.
Getting ready
We will be using the cities application to create a traveler profile, and our screen should be able to change based on different screen sizes and support foldable devices and tablets. To get the entire code, check out the Technical requirements section.
How to do it…
For this recipe, we will create a new project, and this time, instead of picking the empty Compose Activity template, we will pick empty Compose Activity (Material 3
). Material 3
seeks to improve our application’s...