An open API service indexing awesome lists of open source software.

https://github.com/itgoyo/rxjavademo

Rxjava+Retrofit项目练习
https://github.com/itgoyo/rxjavademo

retrofit2 rxjava rxjava2

Last synced: 3 months ago
JSON representation

Rxjava+Retrofit项目练习

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