Page 1 of 4
Continuing the journal charting my progress through Udacity's course for intermediate Java programmers, we come to the second module - the final stage of project Popular Movies. Here we add functionality to produce a fully featured application that looks and feels natural on the latest Android operating system.
But before that, let's do a short recap on what we've accomplished in Stage 1. Up to this point, our application can:
- Fetch data from the Internet with theMovieDB API.
- Use adapters and custom list layouts to populate list views.
- Incorporate libraries to simplify the amount of code you need to write.
- Present the user with a grid arrangement of movie posters upon launch.
- Allow your user to change sort order via a setting; the sort order can be by most popular or by highest-rated.
- Allow the user to tap on a movie poster and transition to a details screen with additional information such as: original title, movie poster image thumbnail, a plot synopsis (called overview in the api), user rating (called vote_average in the api), release date.
Now, in order to meet Stage's 2 specifications we also have to :
- Allow users to view and play trailers (either in the Youtube app or a web browser).
- Allow users to read reviews of a selected movie.
- Allow users to mark a movie as a favourite in the details view by tapping a button (star).
Create a database and content provider to store the names and ids of the user's favourite movies (and optionally, the rest of the information needed to display their favourites collection while offline).
- Modify the existing sorting criteria for the main view to include an additional pivot to show their favourites collection.
At this point, let me begin by noting that as part of Stage 2 you have to go through a huge stack of material, which when you've also got a full time job as well a family to run, looks daunting, at the very least.
Having a high level look at it, the material for this stage is on a mix of very important aspects of the platform, such as the Lifecycle of an application, data persistence through Preferences and Content Providers, exposing code as Background Services, and on responsive UI design with the new Constraint Layout mode.
Breaking the topics down into their sub-units, makes the volume look even larger:
- Why We Need an Activity Lifecycle
- Reto on the Android Activity Lifecycle
- Lifecycle Events
- Save and Restore Instance State
- App Termination
- Preparing for Termination
- AsyncTask and Loaders
- Caching with Loaders
- Preference Fragments
- Making a PreferenceFragment
- Reading From SharedPreferences
- Use Resources!
- Preference Change Listener
- List Preference
- Edit Text Preference
- Edit Size Crashes
Storing Data with SQLite
- Why SQLite?
- Creating the Contract
- Creating the database
- Querying data
- Updating data
- Adding data
- Removing data
Content providers & Building a content provider
- Content Provider Advantages
- Content Provider Permissions
- The Content Resolver
- Four Basic Operations
- Uniform Resource Identifier
- Calling the ContentProvider
- Structure of the Data
- Working with Cursors Review
- Steps to Create a Provider
- Create TaskContentProvider
- Define the URI Structure
- Wildcard Characters
- Build the URIMatcher
- Resolver to Database Flow
- Overview of Provider Functions
- Querying data
- Updating data
- Adding data
- Removing data
- Hook it up to the UI
- Swipe to Delete
- Using a CursorLoader
- Running in the Background
- Services vs. Loaders
- Starting Services
- Intent Services
- Pending Intents
- Foreground Services
- Issuing Reminders
- Scheduling Jobs
- Broadcast Receivers
Completing and Polishing the Ui
- Views & View Groups
- Constraint Layout
- Adding Shapes and Images
- The Hierarchy Viewer
- Data Binding
- Accessibility & Internationalization
- Android Design Principles
- Visual Mocks and Keylines
- Color Guidelines
- Font Guidelines
- Styles and Themes
- Screen Density
- Different Layouts
- Resource Folder Qualifiers
- Touch Selectors
In addition, you're also supposed to apply all of the assimilated knowledge to the building of the Sunshine application before tackling the project.
Thankfully, my mentor was there to help me out of this kind of confusion:
Hi Dianne, are the chapters on Background Tasks, Completing the UI and Polishing the UI necessary for doing project 2?
I also don't know how to approach stage 2.The amount of the material is daunting and I don't have the time to go into it in detail but would like to just do the necessary required for doing project 2 and potentially come back later for the rest.
I personally don't think those particular chapters are necessary.
You could go by the rubric. Or Start with the trailers or reviews first. Any additional classes, the network call and then the layout...
Check the rubrik out and the implementation guide then I suggest you make a check list of the features you need to implement.Then check to see which one you're more familiar with and start with that....
I know it seems like a lot to do right now that's why you need to do it one at a time. Building the features incrementally is a good approach to these things.
Armed with that kind of guidance, I set out to examine the rubric for the stage more closely. In fact it specifies the exact actions one has to take in order to meet the specifications:
In meeting the User Interface/Layout specifications, the UI has to:
- Contain an element (e.g., a spinner or settings menu) that toggles the sort order of the movies by: most popular, highest rated.
- In addition, the movies should be displayed in the main layout via a grid of their corresponding movie poster thumbnails.
- The UI should contain a screen for displaying the details for a selected movie.
- The Movie Details layout should contain the title, release date, movie poster, vote average, and plot synopsis.
- The Movie Details layout should contain a section for displaying trailer videos and user reviews.