use of com.looklook.xinghongfei.looklook.bean.news.NewsList in project LookLook by xinghongfei.
the class TopNewsPrensenterImpl method getNewsList.
@Override
public void getNewsList(int t) {
mITopNewsFragment.showProgressDialog();
Subscription subscription = ApiManage.getInstence().getTopNewsService().getNews(t).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<NewsList>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
mITopNewsFragment.hidProgressDialog();
mITopNewsFragment.showError(e.toString());
}
@Override
public void onNext(NewsList newsList) {
mITopNewsFragment.hidProgressDialog();
mITopNewsFragment.upListItem(newsList);
}
});
addSubscription(subscription);
}
Aggregations