Skip to content

Sample Movie app using MVVM architecture in Kotlin using Disney API

Notifications You must be signed in to change notification settings

myofficework000/EngagementLabAssignment

Repository files navigation

EngagementLabAssignment

This is a sample android application to get movies list🍿using Disney API - which is built to demonstrate use of Modern Android development tools. It has been built using kotlin with clean architecture principles and MVVM pattern as well as Architecture Components. Dedicated to all Android Developers with ❤️.

About

The app in itself is a simple movie searrch on the basis Id. Clicking the movie list item it shows the detail of the movie. While this is not an extremely complex app, it isn't a silly Hello World one either, so the hope is that it'll cover regular use cases for a basic application.

Sailent Features:

  • List of movies.
  • Search the movies on basis of Id.
  • View the list of movies based on the search result.
  • On click of movie, detail of movie
  • Unit tesing for view models
  • UI testing for UI

📸 Screenshots

Please click the image below to enlarge.

Built With 🛠

  • Kotlin - First class and official programming language for Android development.
  • Coroutines - For asynchronous and more..
  • Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
    • LiveData - Data objects that notify views when the underlying database changes.
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • ViewBinding - Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views.
  • Retrofit - A type-safe HTTP client for Android and Java.
  • GSON - A Java serialization/deserialization library to convert Java Objects into JSON and back.
  • GSON Converter - A Converter which uses Gson for serialization to and from JSON.
  • OkHttp3 - For implementing interceptor, logging and mocking web server.
  • PICASSO - An image loading and caching library for Android focused on smooth scrolling.
  • Material Components for Android - Modular and customizable Material Design UI components for Android.
  • Junit -- for unit testing of View model
  • Mockito-- for unit testing of view model
  • Espresso -- for unit testing of UI

Package Structure

com.example.assignment               # Root Package
.
├── model                            # Model Layer 
│   ├── remote                            
|   │   ├── api                      # Retrofit client and Services
│   ├── responses                    # Data classes 
│         
|└── viewmodel
|      |__ MainViewModel             # For List of movies
|      |__DetailViewModel            # For Detail of movie
|
├── view                             # Activity/View layer
│   ├── activities___
|   |           |____MainActivity    # List Screen View
|   |           |____DetailActvity   # Detail Screen View
|   ├── adapter                      # Adapter for RecyclerView
| 
|
└── utils                            # Utility Classes / Kotlin extensions

Architecture

This app uses MVVM (Model View View-Model) architecture.

Contact - Let's become friend

Don't forget to star ⭐ the repo it motivates me to share more open source