❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin) architecture.

Overview

MarvelHeroes

License API Build Status Profile

MarvelHeroes is a demo application based on modern Android application tech-stacks and MVVM architecture.
Fetching data from the network and integrating persisted data in the database via repository pattern.


Download

Go to the Releases to download the latest APK.

Tech stack & Open-source libraries

  • Minimum SDK level 21
  • Kotlin based + Coroutines for asynchronous.
  • JetPack
    • LiveData - notify domain layer data to views.
    • Lifecycle - dispose of observing data when lifecycle state changes.
    • ViewModel - UI related data holder, lifecycle aware.
    • Room Persistence - construct a database using the abstract layer.
  • Architecture
    • MVVM Architecture (View - DataBinding - ViewModel - Model)
    • Repository pattern
    • Koin - dependency injection.
  • Retrofit2 & Gson - construct the REST APIs.
  • OkHttp3 - implementing interceptor, logging and mocking web server.
  • Sandwich - construct lightweight http API response and handling error responses.
  • Glide - loading images.
  • TransformationLayout - implementing transformation motion animations.
  • WhatIf - checking nullable object and empty collections more fluently.
  • AndroidVeil - easy way to implement veil skeletons and shimmering effect.
  • DiscreteScrollView - implementing a scrollable list of items.
  • Timber - logging.
  • Material-Components - Material design components like ripple animation, cardView.

Unit Testing Frameworks

Unit Tests verify the interactions of viewmodels between repositories and dao & REST api requests.

  • Robolectric - Robolectric is the industry-standard unit testing framework for Android.
  • Mockito-Kotlin - a small library that provides helper functions to work with Mockito in Kotlin.

screenshot555159853

Architecture

MarvelHeroes is based on MVVM architecture and a repository pattern.

architecture

Find this repository useful? ❤️

Support it by joining stargazers for this repository.
And follow me for my next creations! 🤩

License

Designed and developed by 2020 skydoves (Jaewoong Eum)

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.
You might also like...
MVVM ,Hilt DI ,LiveData ,Flow ,SharedFlow ,Room ,Retrofit ,Coroutine , Navigation Component ,DataStore ,DataBinding , ViewBinding, Coil
MVVM ,Hilt DI ,LiveData ,Flow ,SharedFlow ,Room ,Retrofit ,Coroutine , Navigation Component ,DataStore ,DataBinding , ViewBinding, Coil

RickMorty This is a simple app which has been implemented using Clean Architecture alongside MVVM design to run (online/offline) using : [ MVVM ,Hilt

This is an example of a simple application with layered software base on clean-architecture as application architecture and mvvm as presentation architecture

This is an example of a simple application with layered software base on clean-architecture as application architecture and mvvm as presentation archi

Exercício utilizando ViewModel e LiveData

Unscramble App Starter code for Android Basics codelab - Store the data in a ViewModel Unscramble is a single player game app that displays scrambled

Enemigos5 - Recyclerview-ViewModel-LiveData on Android with Kotlin

Enemigos5 Recyclerview-VievModel-LiveData on Android with Kotlin. Es muy simple:

In this single activity app. i was trying to practice on ViewModel and Livedata

CalwithViewModel In this single activity app. i was trying to practice on ViewModel and Livedata Min Api Level : 19 Setup Requirements Android device

Super Heroes Kata for Android Developers in Kotlin. The main goal is to practice UI Testing.
Super Heroes Kata for Android Developers in Kotlin. The main goal is to practice UI Testing.

KataSuperHeroes in Kotlin We are here to practice UI Testing. We are going to use Espresso to interact with the Application UI. We are going to use Ko

A korge map generator for Pocket Palm Heroes remastered
A korge map generator for Pocket Palm Heroes remastered

Korge mapgen This is a korge map generator for Pocket Palm Heroes remastered. Algorithm Is based mostly on this presentation by Gus Smedstad, who is t

🍓CookHelper - food social network. The Api and Websocket are based on Ktor framework. Dependency injection with Koin library.

CookHelper [ 🚧 Work in Progress 🚧 ] CookHelper is a cross-platform application that will allow you to cook a delicious dish from an existing recipe

 🗡️ Deddit demonstrates modern Android development with Hilt, Coroutines, Flow, Jetpack, and Material Design based on MVVM architecture
🗡️ Deddit demonstrates modern Android development with Hilt, Coroutines, Flow, Jetpack, and Material Design based on MVVM architecture

Deddit demonstrates modern Android development with Hilt, Coroutines, Flow, Jetpack (ViewModel,Paging3), and Material Design based on MVVM

Comments
  • App is unusable in landscape orientation

    App is unusable in landscape orientation

    • App Version - 1.0.0.Release from https://github.com/skydoves/MarvelHeroes/releases/download/1.0.0/app-debug.apk
    • Affected Device(s) Asus X01BD

    Describe the Bug:

    Unable to scroll in the heroes' detail pages.

    Expected Behavior:

    App to adapt to landscape orientation and display the content properly

    Attached gif of the app in landscape

    opened by kriticalflare 2
  • java.lang.NoClassDefFoundError

    java.lang.NoClassDefFoundError

    I have direct fetch the code and run without build error, then app crash either vm or my phone. I can't found the issues. here is the out put

    2021-05-06 14:11:38.439 5267-5267/com.skydoves.marvelheroes E/AndroidRuntime: FATAL EXCEPTION: main Process: com.skydoves.marvelheroes, PID: 5267 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/material/transition/MaterialContainerTransformSharedElementCallback; at com.skydoves.transformationlayout.TransitionExtensionKt.onTransformationStartContainer(TransitionExtension.kt:31) at com.skydoves.marvelheroes.view.ui.main.MainActivity.onCreate(MainActivity.kt:30) at android.app.Activity.performCreate(Activity.java:6662) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.material.transition.MaterialContainerTransformSharedElementCallback" on path: DexPathList[[zip file "/data/app/com.skydoves.marvelheroes-2/base.apk"],nativeLibraryDirectories=[/data/app/com.skydoves.marvelheroes-2/lib/x86, /system/lib, /vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:380) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.skydoves.transformationlayout.TransitionExtensionKt.onTransformationStartContainer(TransitionExtension.kt:31)  at com.skydoves.marvelheroes.view.ui.main.MainActivity.onCreate(MainActivity.kt:30)  at android.app.Activity.performCreate(Activity.java:6662)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6077)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 

    opened by wolfheros 1
  • When i clone repository cannot create new datasource instance always take old data

    When i clone repository cannot create new datasource instance always take old data

    Please complete the following information:

    • Library Version [e.g. v1.0.0]
    • Affected Device(s) [e.g. Samsung Galaxy s10 with Android 9.0]

    Describe the Bug:

    Add a clear description about the problem.

    Expected Behavior:

    A clear description of what you expected to happen.

    opened by rickymerby 1
  • How to implementation multi adapter into one fragment data binding

    How to implementation multi adapter into one fragment data binding

    Sir, I try binding a fragment, once adapter their no issue.. but i adding new adapter on new recycler view their is always error.

    e: F:\Streetmusicv20\sm\app\build\generated\source\kapt\debug\id\streetmusic\sm\DataBinderMapperImpl.java:9: error: cannot find symbol import id.streetmusic.sm.databinding.FragmentNewsBindingImpl;

    opened by rickymerby 0
Releases(1.0.5)
Owner
Jaewoong Eum
Android software engineer. Digital Nomad. Open Source Contributor. ❤️ Love coffee, music, magic tricks and writing poems. Coffee Driven Development.
Jaewoong Eum
🚀 🥳 MVVM based sample currency converter application using Room, Koin, ViewModel, LiveData, Coroutine

Currency Converter A demo currency converter app using Modern Android App Development techniques Tech stack & Open-source libraries Minimum SDK level

Abinash Neupane 2 Jul 17, 2022
🛒 Mercado Libre App Clone using modern Android development with Hilt, Coroutines, Jetpack (Room, ViewModel), and Jetpack Compose based on MVVM architecture.

Meli Clone ?? Mercado Libre App Clone using modern Android development with Hilt, Coroutines, Jetpack (Room, ViewModel), and Jetpack Compose based on

Esteban Aragon 7 Sep 22, 2022
Shreyas Patil 2.2k Jan 4, 2023
ViewModel-Lifecycle - ViewModel Lifecycle allows you to track and observe Jetpack ViewModel's lifecycle changes

ViewModel Lifecycle ?? ViewModel Lifecycle allows you to track and observe Jetpa

Jaewoong Eum 97 Nov 25, 2022
Viewmodel-lifecycle - ViewModel Lifecycle allows you to track and observe Jetpack ViewModel's lifecycle changes

ViewModel Lifecycle ?? ViewModel Lifecycle allows you to track and observe Jetpa

Jaewoong Eum 36 Feb 6, 2022
:cyclone: A Pokedex app using ViewModel, LiveData, Room and Navigation

Pokedex app built with Kotlin Download Go to the releases page to download the latest available apk. Screenshots Development Roadmap Kotlin LiveData N

Marcos Paulo Farias 1.4k Dec 28, 2022
Use Android Jetpack libraries, Android Architecture Components, ViewModel and LiveData to build this app.

Unscramble App Starter code for Android Basics codelab - Store the data in a ViewModel Unscramble is a single player game app that displays scrambled

Shaima Alghamdi 2 Aug 18, 2022
🔥采用 Kotlin 语言编写,专为新手入门准备的项目。单Activity多Fragment,MVVM,ViewModel + LiveData + Retrofit + 协程, ViewBinding等等。拒绝过度设计和封装,项目结构清晰,代码简洁优雅。

前言 学习Kotlin有一段时间了,想写一个项目总结收获,就有了这个可能是东半球最简洁的玩安卓客户端,在此感谢玩Android 的开放API。 简介 采用 Kotlin 语言编写,专为新手入门准备的项目。单Activity多Fragment,MVVM,ViewModel + LiveData + R

zst 827 Dec 31, 2022
Android MVVM Architecture using Kotlin, RxJava, Koin.

Android-MVVM-RxJava-Digikala_kotlin Digikala sample app developed MVVM architecture design pattern that follow the best practices of Object Oriented D

Hossein Soltani Nejad 2 Sep 10, 2022