A simple project that describes the relationship between the view and it's viewmodel in android development

Overview

View-ViewModel-Communication

A simple project that describes the relationship between the view and it's viewmodel in android development

In MVVM architecture, this sample project describes how the View layer shouldn't directly alter its views. Developers have the tendency of altering the state of their views directly from the View layer, this has a tendency of causing bugs and making scalability difficult.

This approach shows how the ViewModel carries the responsibility of handling the state of the views. The views send actions to the viewModel which in turn alter the state of the views. The state also include a Warning state that is triggered when the minimum or maximum numbers are reached.

Another advantage of this approach is that the state of the views are maintained during configuration change, this prevents the step of retaining state using things like savedInstanceState.

Screenshots

screenshot 1 screenshot 2 screenshot 3

You might also like...
ViewModel e LiveData - Android Studio - Kotlin

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

🍭 GithubSearchKMM - Github Repos Search - Android - iOS - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Dependency Injection, shared KMP ViewModel, Clean Architecture
🍭 GithubSearchKMM - Github Repos Search - Android - iOS - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Dependency Injection, shared KMP ViewModel, Clean Architecture

GithubSearchKMM Github Repos Search - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Depend

[Android-Kotlin] MVVM, ViewModel, LiveData, Observer, DataBinding, Repository, Retrofit, Dagger example

SimpleMvvmDaggerKotlin [Android-Kotlin] MVVM, ViewModel, LiveData, Observer, DataBinding, Repository, Retrofit, Dagger example [Image1 : User informat

ViewModel ve DataBindig ile LiveData kullanım örneği.
ViewModel ve DataBindig ile LiveData kullanım örneği.

#Android Kotlin ViewModel ve Livedata Görsel Kaynak: https://www.youtube.com/watch?v=suC0OM5gGAA Temiz kod mantığı ve bu mantık doğrultusunda geliştir

A minimal notes application in Jetpack Compose with MVVM architecture. Built with components like DataStore, Coroutines, ViewModel, LiveData, Room, Navigation-Compose, Coil, koin etc.
A minimal notes application in Jetpack Compose with MVVM architecture. Built with components like DataStore, Coroutines, ViewModel, LiveData, Room, Navigation-Compose, Coil, koin etc.

Paper - A Minimal Notes App A minimal notes application in Jetpack Compose with MVVM architecture. Built with components like DataStore, Coroutines, V

Shared ViewModel in Kotlin Multiplatform

multiplatform-viewmodel 🗳 Create shared ViewModel's for shared business logic using our ViewModel base class. Features Uses Jetpack ViewModel on Andr

Android-Boilerplate - Base project for android development with new technology

Android-Boilerplate Base project for android development with new technology, in

CleanArchitecture is a sample project that presents a modern, 2021 approach to Android application development.
CleanArchitecture is a sample project that presents a modern, 2021 approach to Android application development.

CleanArchitecture is a sample project that presents a modern, 2021 approach to Android application development. The goal of the pro

Blinking-image-view - A variant of Android View that blinks only the source image (not the background)

Blinker View for Android What is this? Blinker View is an Android View that blinks a given drawable. Yes, it's that simple. Place it in your layout an

Owner
Segun Francis
Android Developer
Segun Francis
🪐 Modern Android development with Hilt, Coroutines, Flow, JetPack(ViewModel) based on MVVM architecture.

Ceres ?? Modern Android development with Hilt, Coroutines, Flow, JetPack(ViewModel) based on MVVM architecture. Download Gradle Add the dependency bel

Teodor G. 21 Jan 11, 2023
Link-converter - A web service that converts links between web url and deeplink for mobile and web applications

Deep Link Converter Linkleri, mobil ve web uygulamaları için web url ile deeplin

Muhammed Eren DURSUN 2 Apr 9, 2022
D-KMP Architecture official sample: it uses a shared KMP ViewModel and Navigation for Compose and SwiftUI apps.

D-KMP architecture - official sample This is the official sample of the D-KMP architecture, presenting a simple master/detail app, for Android, iOS an

null 594 Jan 3, 2023
Demonstrating Micronaut 3.1.3 conflict between caches in application.yml and MicronautCaffeineCacheMetrics.monitor

This application illustrates an issue with using a caches section in application.yml in conjunction with MicronautCaffeineCacheMetrics.monitor. The co

Mark Fisher 0 Nov 4, 2021
ShapeShift️ - A Kotlin library for intelligent object mapping and conversion between objects

ShapeShift️ A Kotlin library for intelligent object mapping and conversion between objects. Documentation Installation Maven Gradle Groovy DSL Kotlin

KRUD 127 Dec 7, 2022
Sample app that implements MVVM architecture using Kotlin, ViewModel, LiveData, and etc.

TheShard is a project to showcase different architectural approaches to developing Android apps. In its different branches you will find the same app (A movie Listing and detail page) implemented with small differences.

null 17 Aug 19, 2021
LifecycleAwareGitHubSearch - The Activity Lifecycle and the ViewModel Architecture

Lifecycle-Aware GitHub Search In this project, we'll modify our GitHub search ap

null 1 Feb 8, 2022
Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development using Kotlin and latest tech-stack.

Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development using Kotlin and latest tech-stack.

Mr.Sanchez 176 Jan 4, 2023
An application for converting between units

currency-converter This is an Android Based Application for helping users convert between currencies. The project is part of our Android Jam Series La

MMU CIT CLUB 2 Nov 5, 2021
Android To-Do MVVM Architecture App written in Kotlin.(ViewModel, ROOM, Livedata, Coroutines)

MVVM-To-Do-App A To-Do application written in kotlin using Android Architectural components What's new? Room + Coroutines - Upgraded Room to v2.1. Roo

Naveen T P 77 Dec 8, 2022