20Camera II: Taking Pictures and Handling Images
In this chapter, you will capture an image from the camera’s preview and save it as a JPEG on the filesystem. Then you will associate that JPEG with a Crime and display it in CrimeFragment’s view. You will also offer the user the option to view a larger version of the image in a DialogFragment.
Figure 20.1 Crime photo thumbnail and larger-size images
Taking a Picture
First, you are going to update CrimeCameraFragment’s layout to include a progress indicator. Sometimes the picture-taking process can take a while, and you do not want users getting antsy.
In layout/fragment_crime_camera.xml, add the ...
Get Android Programming: The Big Nerd Ranch Guide 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.