Skip to content

A simple illustration of using modern Android development architecture (MVVM + Kotlin + Retrofit2 + Hilt + Coroutines + Kotlin Flow + mockK + Espresso + Junit) to showcase the usage of network calls in adapter

Notifications You must be signed in to change notification settings

Wajahat-Jawaid/NetworkCallsInAdapter

Repository files navigation

NetworkCallsInAdapter

Architecture:

  • Built with Modern Android Development practices
  • Utilized Usecase, Repository pattern for data
  • Includes unit tests for Use cases, Repository, ViewModels, API Service response

Features:

  • Popular photos with pagination support
  • Quickly explore top categories like Cars, Mountains, Animals, Interior etc
  • Search query with pagination support
  • Comes in both light and dark mode

🔭 . Download Demo on Android
Download the apk file on your Android phone and enjoy the Demo App :)

Architecture

  • Kotlin - First class and official programming language for Android development.
  • Jetpack Compose - Android’s latest recommended, modern toolkit for building native UI in a declarative way.
  • Coroutines - For asynchronous and non-blocking programming.
  • Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
  • LiveData - Lifecycler-aware, observable data holder objects that notifies their observers.
  • ViewModel - Business logic or screen level state holder class.
  • Material Components - Modular and customizable Material Design UI components for Android.
  • Jetpack Compose Navigation - Navigate between the composables.
  • Espresso - Helps you to write concise, beautiful, and reliable Android UI tests.
  • Roboelectric - A black box testing, making the tests more effective for refactoring and allowing the tests to focus on the behavior of the application instead of the implementation.

Package Structure

  • data Classes to manage data communication across different components
    • file Repositories to fetch the files
  • model Contains the data models
  • ui Classes dealing with the presentation including Composables, Navigation, ViewModels etc.
    • component Composable components used across the screens
    • home Home screen composables to display the list of files
    • theme App themes
    • utils Utility classes specifically for the views
  • utils Utility classes

About

A simple illustration of using modern Android development architecture (MVVM + Kotlin + Retrofit2 + Hilt + Coroutines + Kotlin Flow + mockK + Espresso + Junit) to showcase the usage of network calls in adapter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages