MVVM(Model View ViewModel) sample in Kotlin using the components ViewModel, LiveData and Retrofit library

Overview

kotlin-mvvm

Languages: English, Spanish

Kotlin Gradle Mockito

MVVM(Model View ViewModel) sample in Kotlin using the components ViewModel, LiveData, the libraries Retrofit, Glide and Mockito for testing.

MVVM Pattern (Model View ViewModel)

Demo

Architecture

Flow

Screenshots

Slides

Android MVVM https://docs.google.com/presentation/d/1nTwtU8OWYs_8Q3i_3hOPAWodDpDKzO--uA-4b6LUr8g/edit?usp=sharing

Android MVVM Clean https://docs.google.com/presentation/d/1luTzvqGaMjVycEx109-AjYIj3FIpXYAt3Mnu-gjqxtc/edit?usp=sharing

Updates [August 2020]

  • Added dependency injection with Hilt, included android tests branch hilt

  • Added unit tests with Flow branch flow

  • Added kotlin Flow and fragment ktx branch flow

  • Room branch room

  • Added View Binding branch viewbinding

  • Dependencies versions were updated and ViewModelProviders class was removed (deprecated). all branches

  • Added Coroutines with retrofit and sealed classes to replace callbacks. Included testing with Coroutines. branch coroutines

  • Added Koin, dependency injection framework written in Kotlin. Included integration with Mockito for testing (11th Oct) branch koin

  • Added Unit Testing with Mockito (27th May) Link

  • Fix load images android P by Carlos Ugaz carlosgub Link

Dependencies

References

Contributing and reporting issues

If you want to contribute in this repository, please send me a pull request or if you want to report some issues please send at https://github.com/emedinaa/kotlin-mvvm/issues

I appreciate any question or comment. Also, if you consider it useful, you can give me a star .

You might also like...
A sample app that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach
A sample app that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach

A sample app that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach

ViewModel and ViewModelFactory Starter Code

ViewModel and ViewModelFactory - Starter Code Use as starter code for the ViewModel codelab. Introduction This starter app is a two player game, Guess

Starter code for Android Basics codelab - Store the data in a ViewModel

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

Use as starter code for the ViewModel codelab.

ViewModel and ViewModelFactory - Starter Code Use as starter code for the ViewModel codelab. Introduction This starter app is a two player game, Guess

Quarkus Sample Application with extensions cache, kotlin, rest client, resteasy and smallrye

quarkus-sample Project This project uses Quarkus, the Supersonic Subatomic Java Framework. If you want to learn more about Quarkus, please visit its w

A sample Album list app that shows how to use ViewModels and Room together with RxJava & Dagger2, in Kotlin by Clean Architecture.

Kotlin-MVVM-Hilt A sample Album list app that shows how to use ViewModels and Room together with RxJava & Dagger2, in Kotlin by Clean Architecture. Im

Small project on using Room + MVVM + data binding

healthinfo This is a demo project that utilizes Room Database, MVVM, Data binding, Repositories, Retrofit and more to build an app that reads content

This is an example implementation of android accessibility services with 5 Sample Actions
This is an example implementation of android accessibility services with 5 Sample Actions

Android Accessibility Services Example This is an example implementation of android accessibility services with 5 Sample Actions such as: Simulate Pow

 Android Modern Architecture Sample
Android Modern Architecture Sample

AndroidModernArchitectureSample TODO: write readme Download (playstore release - under review) https://play.google.com/store/apps/details?id=io.github

Comments
  • added a fantastic logo

    added a fantastic logo

    hola, Eduardo José Medina Alfaro i designed a logo for this repo please have a look at that . This is my first pull request I wish you'll love that too

    opened by wizzzx 1
Owner
Eduardo José Medina Alfaro
Android Developer
Eduardo José Medina Alfaro
FTUE sample using Jetpack Navigation's Navigation-Compose, ViewModel, SavedStateHandle, Hilt

Jetpack Navigation's Navigation-Compose + Jetpack Compose + NavGraphs + SavedStateHandle + Dagger-Hilt + EventEmitter (toasts / navigation commands) T

Gabor Varadi 15 Dec 8, 2022
Base App - MVVM, Base Structure, Hilt, Kotlin Flow, Retrofit

Base App - MVVM, Base Structure, Hilt, Kotlin Flow, Retrofit

Kerem TÜRKER 39 Nov 17, 2022
This application features - Modern Minimalistic Design, MVVM, Pagination, Hilt, Retrofit, Room, Data Store, Flow, Live Data, Navigation Component (Clean Architecture)

NewsFly NewsFly is a modern news android application which features virtually ALL recent and recommended android development tech stack and tools used

Ibrahim 121 Nov 4, 2022
REST API with Retrofit, SQLite with Room, Hilt, MVVM, Jetpack Compose

Simple REST API Learn how to make an Android App that will call a REST API using Retrofit to retrieve some data that will be stored in SQLite using Ro

Yayo Arellano 26 Dec 23, 2022
Saga of Star wars - An Android sample repo showcasing Clean Arch with MVVM and Epoxy models

Star Wars Universe This is a showcase android application written in Kotlin and follows Clean Code architecture to showcase Characters from the StarWa

Adit Lal 5 Dec 13, 2022
This is an example repository to demonstrate the good practices of using ViewModel and how usage of AndroidViewModel can make things worst in a codebase

ViewModel Good Practices ??‍♂️ This is a example repository to demonstrate the good practices of using ViewModel and how usage of AndroidViewModel can

Shreyas Patil 29 Sep 28, 2022
Sample Android Clean MVVM architecture

Sample Android Clean MVVM architecture ( Retrofit + Okhttp + Moshi + Coil + Room + Navigation Component + Coroutines + Flow + DataStore + ViewModel + Hilt + Compose )

Javad 3 Jun 30, 2022
A sample photo browsing app in Kotlin, Android using Picsum image API.

Picsum Photo App Functionality The app's functionality includes: Fetch a list of images from picsum photos api (https://picsum.photos/) and show them

Rafsan Ahmad 15 Nov 2, 2022
Android Viper template with Kotlin, Dagger 2, Retrofit & RxJava

Android VIPER Architecture Example This repository contains a detailed sample client-server app that implements VIPER(View-Interactor-Presenter-Entity

OmiSoft 33 Nov 4, 2022
💖组件化+Jetpack+Kotlin+MVVM项目实战,涉及Jetpack相关组件,Kotlin相关技术,协程+Retrofit,Paging3+Room等。

组件化+Jetpack+Kotlin+MVVM 一、项目简介 该项目主要以组件化+Jetpack+MVVM为架构,使用Kotlin语言,集合了最新的Jetpack组件,如Navigation、Paging3、Room等,另外还加上了依赖注入框架Koin和图片加载框架Coil。 网络请求部分使用OkH

fuusy 502 Dec 28, 2022