March 2013
Beginner to intermediate
580 pages
16h 11m
English
Right now, you can replace a Crime’s photo, but the old file will continue to take up space on disk. Add code to CrimeFragment’s onActivityResult(int, int, Intent) method to check the crime for an existing photo and delete that file from disk.
For another challenge, give users the power to delete a photo without having to replace it. Implement a context menu and/or a contextual action mode in CrimeFragment that is triggered by long-pressing the thumbnail image. Offer a Delete Photo menu item that deletes the photo from the disk, the model, and the ImageView.
Read now
Unlock full access