Skip to content
This repo is to demonstrate how to use shared ViewModel
Kotlin
Branch: master
Clone or download
Latest commit c0fb2a3 Aug 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea shared view model implemented Aug 9, 2018
app shared view model implemented Aug 9, 2018
gradle/wrapper Initial commit Aug 8, 2018
.gitignore Initial commit Aug 8, 2018
README.md Create README.md Aug 11, 2018
build.gradle Initial commit Aug 8, 2018
gradle.properties Initial commit Aug 8, 2018
gradlew Initial commit Aug 8, 2018
gradlew.bat Initial commit Aug 8, 2018
settings.gradle Initial commit Aug 8, 2018

README.md

Shared ViewModel Sample

How to communicate between fragments and activity?

Before ViewModel the best way was to use interface to communicate or pass date between fragments and activity. But, now we can use ViewModel and it will be very easy. We just need to create the ViewModel in activity scope and thats it. Just observer the ViewModel. This is a sample project to show the Shared ViewModel implemneteation.

Tutorial and related article on medium.

You can’t perform that action at this time.