Summary

Fragments provide our applications with a level of user interface flexibility that would be difficult to achieve otherwise. By properly designing our application to use fragments and associating the fragment resources with the appropriate device characteristics, we're able to build apps that contain a rich user interface that automatically adapts to the wide variety of Android device form factors that exist. We get all of these capabilities while writing only minimal code.

In the next chapter, we dig into the lifecycle of fragments and explore how we can leverage the fragment lifecycle to create more responsive user interfaces and leverage specialized Fragment classes.

Get Creating Dynamic UI with Android Fragments now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.