observable

flatZip in RxJava

China☆狼群 提交于 2020-12-02 07:13:30
问题 I'm zipping multiple Observables together and then transforming them in a way that results in an Observable: final Observable<Observable<M>> result = Observable.zip(obs1, obs2, transformFunc); What I'd like to be able to do is: final Observable<M> result = Observable.flatZip(obs1, obs2, transformFunc); What's the cleanest way to do this, given flatZip doesn't exist (maybe I should submit one). At the moment I'm having to flatMap the result in on itself. 回答1: public class RxHelper { public