I’m using LiveData by Google now and they recomend to use a MVVM patter design. For some of my requests I use RxJava2, and listen for responses in SubscribeWith(…).

For example, when I press a button to send some data to the remote data source, I’m showing some loading animation and want to hide it onComplete() event (*inside subscribeWith(…)*). The problem is that I don’t have an access to the View from ModelView. How it’s possible to let the View know that loading animation should be hidden?

*My current idea is to create in interface inside ViewModel and implement it in View. But it ruins the concept of View and ViewModel separation.*