(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/** | |
* 显示并隐藏loading | |
*/ | |
@SuppressWarnings("unchecked") | |
public static <T> Observable.Transformer<T, T> showLoading(final ILoading loading) { | |
return new Observable.Transformer<T, T>() { | |
@Override | |
public Observable<T> call(Observable<T> observable) { | |
return observable | |
.doOnSubscribe(new Action0() { |
/** | |
* entity可用性常规则检查 | |
*/ | |
@SuppressWarnings("unchecked") | |
public static <T> Observable.Transformer<BaseEntity<T>, T> check() { | |
return new Observable.Transformer<BaseEntity<T>, T>() { | |
@Override | |
public Observable<T> call(Observable<BaseEntity<T>> observable) { | |
return observable.flatMap(new Func1<BaseEntity<T>, Observable<T>>() { | |
@Override |