Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shuza committed Aug 11, 2018
1 parent 7b17ade commit c0fb2a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 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](https://medium.com/@shuza.sa/how-to-communicate-between-fragments-and-activity-using-viewmodel-ca733233a51c).

0 comments on commit c0fb2a3

Please sign in to comment.