Hey, glad you liked it!
Aidan Mcwilliams

It’s not easy to explain, I hope I’ll find the time to write a post soon! I created a ViewState class to maintain a read only class with all the data used in the view (like in redux or other unidirectional architectures). In the layout file there are two binding object: the viewState contains the data and the viewModel the actions (for example an action invoked on a click). I like this architecture because it’s “predictable”, using immutable data there aren’t concurrency problems and when you modify the data you update the layout manually invoking executePendingBindings to immediately update the view.

About the livedata I still prefer to use RxJava, in my opinion they can be used instead of ObservableField (but then you need to manually update the layout).

Like what you read? Give Fabio Collini a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.