Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void loadAllData(){
- compositeDisposable.add(retrofitInterface
- .getAllCountries()
- .flattenAsObservable((Function<List<Country>, Iterable<?>>) countries -> countries)
- .flatMap(new Function<Country, ObservableSource<Bitmap>>() {
- @Override
- public ObservableSource<Bitmap> apply(Country country) throws Exception {
- return null;
- }
- })
- .subscribe());
- }
- private Observable<Bitmap> getFlags(String flag) {
- return retrofitInterface.getFlag(flag)
- .toObservable()
- .subscribeOn(Schedulers.io())
- .observeOn(AndroidSchedulers.mainThread());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement