The past decade held a lot of movies, some left a mark and some were just a set of 24-60 pictures per second. This app is a Master-Detail Application to showcase those movies and the signature they left behind.
- Load movies list from a local JSON file.
- Search movies by name.
- Categorize the movies search results by year and each year category has the top 5 rated movies within.
- Once a movie is selected from the search results, the user will be switched to a detailed view to unveil the
following:
- Movie Title
- Movie Year
- Movie Genres (if any)
- Movie Cast (if any)
- A list of pictures fetched from Flickr that matches the movie title as the search query
- Parse the movies that are inside the local JSON file.
- Cache the movies in a local database to optimize loading time, reducing parsing overhead.
- Implement movies search by name functionality.
- Group the movies search results by year, and show the top 5 rated movies only for each year.
- Optimize movies search and sorting performance.
- Load movie images using Flickr Photos API.
- Create a nice transition between Master and Detail views.
- Create MotionLayout scenes.
- Implement unit tests.
- Implement integration tests.
- Implement end-to-end tests (UI tests).
- Document the unfamiliar code.
MVVM (Model-View-ViewModel) Architecture is used in this project. It removes the tight coupling between each component. Most importantly, in this architecture, the children don't have direct reference to the parent; they only have reference by observables.
Although one could just serialize/deserialize the movies genres and cast as a list, having one table only, creating separate tables for each is preferable to ensure scalability in the future, so that one could easily implement filter options by genre or cast for instance if needed later on.
- Kotlin, the programming language used
- Kotlin Coroutines for asynchronous APIs
- Kotlin Flow for handling states and having operators
- Kotlin DSL for writing Kotlin instead of Groovy in Gradle scripts
- AndroidX Libraries that are part of Android Jetpack
- Data Binding for binding views and safer view reference
- ViewModel for communicating between the view and the model layers
- LiveData for implementing the Observer design pattern
- Android Lifecycle for handling the lifecycle of architecture components
- Navigation Component for easier and safer navigation between fragments
- Room for caching data in a SQLite database
- Koin for implementing Service Locator design pattern
- Retrofit for making network requests
- Moshi for parsing network responses and JSON files
- Glide for loading images with URL
- SpinKit for showing a unique progress bar
- Auto Image Slider for implementing a slide show of images
- Timber for easier logging without defining tags
- JUnit 4 for writing unit tests
- AndroidX Test Libraries for testing Android code with JUnit
- Hamcrest for more idiomatic tests
- Mockito for mocking APIs
- Espresso for writing UI tests
- Android Device with API 21 minimum
- Create Flickr Photos API Key
-
Clone the app using Git or import it to Android Studio.
-
Create a
credentials.properties
file, and add it to the project root folder. Inside it add the Flickr Photos API key named asflickrApiKey
.
- To test the app, there is an APK build here that you can directly download and install.