Skip to content

lin1000/codepath-project1-flicks

Repository files navigation

Project 1 - Week1 Assignment

Week1 Assignment shows the latest movies currently playing in theaters. The app utilizes the Movie Database API to display images and basic information about these movies to the user.

Time spent: 16 hours spent in total

User Stories

The following required functionality is completed:

  • User can scroll through current movies from the Movie Database API
  • Layout is optimized with the ViewHolder pattern.
  • For each movie displayed, user can see the following details:
    • Title, Poster Image, Overview (Portrait mode)
    • Title, Backdrop Image, Overview (Landscape mode)

The following optional features are implemented:

  • Display a nice default placeholder graphic for each image during loading.
  • Improved the user interface through styling and coloring.

The following bonus features are implemented:

  • Allow user to view details of the movie including ratings and popularity within a separate activity or dialog fragment.
  • When viewing a popular movie (i.e. a movie voted for more than 5 stars) the video should show the full backdrop image as the layout. Uses Heterogenous ListViews or Heterogenous RecyclerView to show different layouts.
  • Allow video trailers to be played in full-screen using the YouTubePlayerView.
    • Overlay a play icon for videos that can be played.
    • More popular movies should start a separate activity that plays the video immediately.
    • Less popular videos rely on the detail page should show ratings and a YouTube preview.
  • Apply the popular Butterknife annotation library to reduce boilerplate code.
  • Apply rounded corners for the poster or background images using Picasso transformations
  • Replaced android-async-http network client with the popular OkHttp networking libraries.

The following additional features are implemented:

  • List anything else that you can get done to improve the app functionality!

Video Walkthrough

Here's a walkthrough of implemented user stories:

Imgur

Alt text

xxxx

GIF created with LiceCap.

Notes

  • Challenge 1 : I want to prevent "Playbutton" showing before movie poster image rendered. So I try to use Async task to control timing of rendering play button.
  • Challenge 2 : Nested Layout is quite helpful when I want to control the position of overlay icon.
  • Challenge 3 : Understand why network request can't run on UI Thread. How android detect the current thread is UI thread or not ?
  • Challenge 4 : OKHttpClient should be singleton according to suggestion. What will happend when I generating multiple client request from this singleton ? Is it thread safe internally?

Describe any challenges encountered while building the app.

Open-source libraries used

License

Copyright [2017] [Tony Lin]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Releases

No releases published

Packages

No packages published

Languages