Regarding the original question, both RxJava and LiveData complement each other really well.
LiveData
shines on ViewModel layer, with its tight integration with Android lifecycles and ViewModel
. RxJava
provides more capabilities in transformations (as mentioned by @Bob Dalgleish).
Currently, we're using RxJava
in data source and repository layers, and it's transformed into LiveData
(using LiveDataReactiveStreams
) in ViewModels (before exposing data to activities/fragments) - quite happy with this approach.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…