Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. private void loadAllData(){
  2. compositeDisposable.add(retrofitInterface
  3.  
  4. .getAllCountries()
  5. .flattenAsObservable((Function<List<Country>, Iterable<?>>) countries -> countries)
  6. .flatMap(new Function<Country, ObservableSource<Bitmap>>() {
  7. @Override
  8. public ObservableSource<Bitmap> apply(Country country) throws Exception {
  9. return null;
  10. }
  11. })
  12. .subscribe());
  13.  
  14. }
  15. private Observable<Bitmap> getFlags(String flag) {
  16.  
  17. return retrofitInterface.getFlag(flag)
  18. .toObservable()
  19. .subscribeOn(Schedulers.io())
  20. .observeOn(AndroidSchedulers.mainThread());
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement