SHARE
TWEET

Untitled

a guest Apr 26th, 2019 73 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( country -> getFlags(new String()))
  7.                 .subscribe());
  8.  
  9.     }
  10.     private Observable<Bitmap> getFlags(String flag) {
  11.  
  12.         return  retrofitInterface.getFlag(flag)
  13.                 .toObservable()
  14.                 .subscribeOn(Schedulers.io())
  15.                 .observeOn(AndroidSchedulers.mainThread());
  16.  
  17.     }
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