Now that you've assembled all of the parts required for the attachments to be created and previewed, you need to actually populate the area where they will be previewed. The AttachmentPagerFragment class will not only serve to encapsulate the ViewPager used to preview the attachments, but will also encapsulate the logic required to add new attachments to the user's claim. This will be done by moving the onRequestPermissionsResult and onActivityResult from the CaptureClaimActivity to the new AttachmentPagerFragment class. This process will require moving some of the code out of CaptureClaimActivity and into the Fragment class, so you'll be in for some cutting and pasting. Let's get started:
- Create a ...