SHARE
TWEET

Untitled

a guest Apr 26th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top