Skip to content

This is a sample app to demonstrate various Android Jetpack Library apis.

Notifications You must be signed in to change notification settings

biratrai/PopularMovies

Repository files navigation

Popular Movies App

This is a sample app to demonstrate various Android Jetpack Library apis.

Introduction

Android Jetpack is a set of components, tools and guidance to make great Android apps. They bring together the existing Support Library and Architecture Components and arranges them into four categories:

Android Jetpack

Popular Movies Android app is using the material design with support library and design library.

The data is coming from moviedb.org using the discover apis.

It is a basis to learn the android support library for design and the new Android Architecture Component.

Main App Screen Detail App Screen

The Android Apis used:

This project mainly is concerned with Android Architecture Component as a whole.

  • Lifecycle Components - These components provide constructs to tie core components to android lifecycle events.
  • LiveData - Is an observable lifecycle-aware data holder class.
  • ViewModel - Is a helper class that contains UI data for activity or fragment to separate view logic from controller logic.
  • Data Persistence - This is a Room Library to simplify sqlite with object-mapping abstraction layer.

Getting Started

This project uses the Gradle build system. To build this project, use the gradlew build command or use "Import Project" in Android Studio.

There are two Gradle tasks for testing the project:

  • connectedAndroidTest - for running Espresso on a connected device
  • test - for running unit tests

For more resources on learning Android development, visit the Developer Guides at developer.android.com.

Libraries Used

  • Foundation - Components for core system capabilities, Kotlin extensions and support for multidex and automated testing.
    • AppCompat - Degrade gracefully on older versions of Android.
    • Android KTX - Write more concise, idiomatic Kotlin code.
    • Test - An Android testing framework for unit and runtime UI tests.
  • Architecture - A collection of libraries that help you design robust, testable, and maintainable apps. Start with classes for managing your UI component lifecycle and handling data persistence.
    • Data Binding - Declaratively bind observable data to UI elements.
    • Lifecycles - Create a UI that automatically responds to lifecycle events.
    • LiveData - Build data objects that notify views when the underlying database changes.
    • Navigation - Handle everything needed for in-app navigation.
    • Room - Access your app's SQLite database with in-app objects and compile-time checks.
    • ViewModel - Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution.
    • WorkManager - Manage your Android background jobs.
  • UI - Details on why and how to use UI Components in your apps - together or separate
  • Third party
    • Glide for image loading
    • Kotlin Coroutines for managing background threads with simplified code and reducing needs for callbacks

Non-Goals

The focus of this project is on Android Jetpack and the Android framework. Thus, there are no immediate plans to implement features outside of this scope. for DI, there are no plans to incorporate DI into Popular Movies App.
This allows developers unfamiliar with dependency injection to better understand Popular Movies code without having to learn DI.