A Place for Your Photo

The first step is to build out a place for your photo to live on the crime detail screen. You will need two new View objects: an ImageView to display the photo and a Button to press to take a new photo (Figure 16.1).

Figure 16.1  New UI

New UI

Dedicating an entire row to a thumbnail and a button would make your app look clunky and unprofessional. You do not want that, so you will arrange things nicely.

Add new views to res/layout/fragment_crime.xml to build out this new area. Start with the lefthand side, adding an ImageView for the picture and an ImageButton to take a picture.

Listing 16.1  Adding ...

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

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