12 Fragment Navigation
In this chapter, you will get the list and the detail parts of CriminalIntent working together. When a user presses an item in the list of crimes, MainActivity will swap out CrimeListFragment with a new instance of CrimeFragment. CrimeFragment will display the details for the crime that was pressed (Figure 12.1).
Figure 12.1 Swapping
To get this working you will learn how to implement navigation by having the hosting activity change out fragments in response to user actions. You will also learn how to pass data to a fragment instance using fragment arguments. Finally, ...