10Using Fragment Arguments

In this chapter, you will get the list and the detail parts of CriminalIntent working together. When a user clicks on an item in the list of crimes, a new CrimeActivity hosting a CrimeFragment will appear and display the details for a particular instance of Crime.

Figure 10.1  Starting CrimeActivity from CrimeListActivity

Starting CrimeActivity from CrimeListActivity

In GeoQuiz, you had one activity (QuizActivity) start another activity (CheatActivity). In CriminalIntent, you are going to start the CrimeActivity from a fragment. In particular, you will have CrimeListFragment start an instance of CrimeActivity.

Starting an Activity from a Fragment

Starting an activity ...

Get Android Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.