Hour 16 Developing a Complete
App – Flickr Photos
1) Determining app
functionality
2) Planning the app
3) Developing the app
4) Creating a custom
adapter
5) Loading images in a
list
1) An Inventory of the proposed
functionality for the Flickr Photos App
·
Display recent photo from Flickr
·
Pick some photos as favorites
·
View favorite photos
·
Delete non-favorites
Creating a Wireframe for the App
· Figure 16.1 App List view and menu
· Figure 16.2 App grid and detail view
2) Planning the App: Taking Inventory
Need to create the following:
· Action Bar with two tabs and an overflow menu
· Overflow menu on action bar with three choices
· Activity, for swapping in fragments
· List fragment to show photos and titles
· Grid fragment to show photos in a grid
· Detail fragment to show a single photo
3) Developing the App
· Using a Custom CursorAdapter
o Cursor class
o CursorLoader class
· Implementing BindView for ListCursorAdapter
· Creating the Photo and Favorite Photo Fragments
· Show Data in a List or Grid
· Displaying the Selected Images
· Handling Favorites
Final App Inventory
· 1 activity: MainActivity
· 3 fragments: PhotoGridFragment, PhotoListFragment, and ImageFragment
· 2 adapters: GridAdapter and ListAdapter to work with their respective fragments
· 2 layouts for items: list_item.xml and grid_item.xml
· 1 AsyncTask to load images: BitmapLOadTask
· 1 data object: FlickrPhoto
· 1 database adapter: FlickPhotoDbAdapter
· 1 content provider: FlickPhotoProvider
· 1 menu resource
· 2 layouts for fragments
· 1 layout for the activity