Summary

Understanding the fragment lifecycle empowers us to leverage the phases of creation and destruction of fragments to more efficiently manage fragments and the data associated with them. By working with this natural lifecycle, we can take advantage of the specialized fragment classes to create a rich user experience, while following a more consistent programming model than was previously available.

In the next chapter, we build on our understanding of the fragment lifecycle to take more direct control of fragments to dynamically add and remove them within individual activities.

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.