コード例 #1
0
 public static void jokePicList(int page, Subscriber<JokePicBean> subscriber) {
   RxUtils.unsubscribe();
   RxUtils.subscription =
       Network.getBaiDuApi()
           .getJokePic(page)
           .subscribeOn(Schedulers.io())
           .observeOn(AndroidSchedulers.mainThread())
           .subscribe(subscriber);
 }
コード例 #2
0
 public static void tabName(Subscriber<BaseBean.TabNameBean> subscriber) {
   RxUtils.unsubscribe();
   RxUtils.subscription =
       Network.getTngouApi()
           .getTabName()
           .subscribeOn(Schedulers.io())
           .observeOn(AndroidSchedulers.mainThread())
           .subscribe(subscriber);
 }
コード例 #3
0
 public static void imageNew(int id, int rows, Subscriber<BaseBean.ImageNewBean> subscriber) {
   RxUtils.unsubscribe();
   RxUtils.subscription =
       Network.getTngouApi()
           .getImageNews(id, rows)
           .subscribeOn(Schedulers.io())
           .observeOn(AndroidSchedulers.mainThread())
           .subscribe(subscriber);
 }
コード例 #4
0
 public static void newsDetail(int id, Subscriber<NewsDetailInfo> subscriber) {
   RxUtils.unsubscribe();
   RxUtils.subscription =
       Network.getTngouApi()
           .getNewsDetail(id)
           .subscribeOn(Schedulers.io())
           .observeOn(AndroidSchedulers.mainThread())
           .subscribe(subscriber);
 }
コード例 #5
0
 public static void newsList(int id, int page, Subscriber<BaseBean.NewsListBean> subscriber) {
   RxUtils.unsubscribe();
   RxUtils.subscription =
       Network.getTngouApi()
           .getNewsList(id, page)
           .subscribeOn(Schedulers.io())
           .unsubscribeOn(Schedulers.io())
           .observeOn(AndroidSchedulers.mainThread())
           .subscribe(subscriber);
 }