Skip to content

jami4n/FragmentCommunicationWithViewModels

Repository files navigation

Fragment Communication With ViewModels

Fragment to Fragment Communication With ViewModels

A short project on how to enable fragment to fragment / fragment to activity communication using view models and livedata. This strays from the traditional way of using interfaces for achieving the same task.

Using View Models is a much better approach as it facilitates code reduction and helps maintain a better project architecture. Also pushing an update to one Viewmodel will update data in all livedata observables in other fragments without writing extra code.

alt text

About

Fragment to Fragment Communication With ViewModels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages