Creating PhotoGallery
Creating PhotoGallery
Create a new Android application project. Configure the app as shown in Figure 25.3.
Figure 25.3 Creating PhotoGallery
Click Next. When prompted, check Phone and Tablet as the target form factor and choose API 19:
Android 4.4 (KitKat) from the Minimum SDK dropdown.
Then have the wizard create an empty activity named PhotoGalleryActivity.
PhotoGallery will follow the same architecture you have been using so far. PhotoGalleryActivity
will be a SingleFragmentActivity subclass and its view will be the container view defined
in activity_fragment.xml. This activity will host a fragment – in particular, an instance of
PhotoGalleryFragment, which you will create shortly.
Copy SingleFragmentActivity.java and activity_fragment.xml into your project from a previous
project.