ubu
09/10/2018, 1:34 PMViewModel per Fragment or one per Activity, but suppose you have a CustomView, some complex UI panel (that is not a fragment) associated with some important business logic flow. What you may want in this case is some kind of (loose) dependency between your CustomView and your specific ViewModel, so that your CustomView observe ViewModel data. What would be your implementation here?
I came up with the following solution:
https://gist.github.com/uburoiubu/38608df08905d23e10ee919c430c6c34
What you do think? One may extrapolate this to the following question: what would be the best practice to connect a CustomView and a ViewModel?
Thanks.