Skip to content

Instantly share code, notes, and snippets.

@weefbellington
Created July 25, 2014 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weefbellington/29acf66587e22a97039e to your computer and use it in GitHub Desktop.
Save weefbellington/29acf66587e22a97039e to your computer and use it in GitHub Desktop.
rxjava zip example
Action1 onNext = new Action1<R>() {
@Override
public void call(R composedResult) {
//do something
}
};
Observable.zip(observable1, observable2,
new Func2<T1, T2, R) {
@Override
public Result<T> call(T1 arg1, T2 arg2) {
// do something with the return values and compose them into type R
return R;
}
}).subscribe(onNext);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment