Search in sources :

Example 1 with FilmVideoBean

use of com.example.changemax.sqhappy.model.network.entity.FilmVideoBean in project PracticeFilmApplication by FOnlyJack.

the class VideoPlayPresenter method loadFilmVideoListInfo.

@Override
public void loadFilmVideoListInfo(int pageIndex, int movieId) {
    Subscription subscribe = ApiDataManager.getFilmVideoInfo(pageIndex, movieId).doOnSubscribe(new Action0() {

        @Override
        public void call() {
            Logger.d("showLoading");
        }
    }).subscribe(new Subscriber<FilmVideoBean>() {

        @Override
        public void onCompleted() {
            view.onCompleted();
        }

        @Override
        public void onError(Throwable e) {
            view.onError(e);
        }

        @Override
        public void onNext(FilmVideoBean filmVideoBean) {
            datalist.add(filmVideoBean);
            view.displayFilmHitInformation(datalist);
            datalist.clear();
        }
    });
    compositeSubscription.add(subscribe);
}
Also used : Action0(rx.functions.Action0) FilmVideoBean(com.example.changemax.sqhappy.model.network.entity.FilmVideoBean) CompositeSubscription(rx.subscriptions.CompositeSubscription) Subscription(rx.Subscription)

Aggregations

FilmVideoBean (com.example.changemax.sqhappy.model.network.entity.FilmVideoBean)1 Subscription (rx.Subscription)1 Action0 (rx.functions.Action0)1 CompositeSubscription (rx.subscriptions.CompositeSubscription)1