Skip to content

Instantly share code, notes, and snippets.

@immujahidkhan
Created May 28, 2019 20:16
Show Gist options
  • Save immujahidkhan/6eac60eb41ad5995990d63aa3a42ba64 to your computer and use it in GitHub Desktop.
Save immujahidkhan/6eac60eb41ad5995990d63aa3a42ba64 to your computer and use it in GitHub Desktop.
CompositeDisposable compositeDisposable = new CompositeDisposable();
compositeDisposable.add(globa_api_call.getMainModel()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ArrayList<QuotesList>>() {
@Override
public void accept(ArrayList<QuotesList> quotesLists) throws Exception {
displayPosts(quotesLists);
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment