Starting CriminalIntent

In this chapter, you are going to start on the detail part of CriminalIntent. Figure 8.4 shows you what CriminalIntent will look like at the end of this chapter.

Figure 8.4  CriminalIntent at the end of this chapter

CriminalIntent at the end of this chapter

The screen shown in Figure 8.4 will be managed by a UI fragment named CrimeFragment. An instance of CrimeFragment will be hosted by an activity named MainActivity.

For now, think of hosting as the activity providing a spot in its view hierarchy to contain the fragment and its view (Figure 8.5). A fragment is incapable of getting a view onscreen itself. Only when it is inserted in an ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition 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.