Summary

Intentional screen management frees us from the burden of tying each application screen to an individual activity. Using the FragmentTransaction class, we're able to dynamically switch between individual fragments within an activity, eliminating the need to create a separate activity class for each screen in our application. This helps to prevent the proliferation of unnecessary activity classes, better organize our applications, and avoid the associated increase in complexity.

We'll see in the next chapter that this ability to dynamically manage multiple screens within a single activity opens us up to greater flexibility and an increased richness in the appearance and navigation behavior of our Android applications.

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.