https://github.com/itgoyo/rxjavademo
Rxjava+Retrofit项目练习
https://github.com/itgoyo/rxjavademo
retrofit2 rxjava rxjava2
Last synced: 3 months ago
JSON representation
Rxjava+Retrofit项目练习
- Host: GitHub
- URL: https://github.com/itgoyo/rxjavademo
- Owner: itgoyo
- Created: 2017-06-15T09:05:50.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-15T09:13:27.000Z (almost 8 years ago)
- Last Synced: 2025-01-08T08:41:18.844Z (5 months ago)
- Topics: retrofit2, rxjava, rxjava2
- Language: Java
- Size: 126 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RxjavaDemo
Rxjava+Retrofit项目练习```
Observable.create(new ObservableOnSubscribe() {
@Override
public void subscribe(ObservableEmitter e) throws Exception {TianGouBean body = cookService.getTianGou(0, 1, 20).execute().body();
e.onNext(body);
}
}).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(TianGouBean tianGouBean) {List tngou = tianGouBean.getTngou();
int size = tngou.size();for (int i = 0; i