// Path: practicalrecyclerview/src/main/java/zlc/season/practicalrecyclerview/ItemType.java
// public interface ItemType {
//     int itemType();
// }


import android.content.Context;
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.Observer;
import rx.Subscriber;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import rx.subscriptions.CompositeSubscription;
import zlc.season.practicalrecyclerview.ItemType;

                    public void onError(Throwable e) {
                        Log.w("SingleItemPresenter", e);
                        mView.onDataLoadFailed(isRefresh);
                    }

                    @Override
                    public void onNext(List<ItemType> list) {
                        mView.onDataLoadSuccess(list, isRefresh);
                    }
                });
        mSubscriptions.add(subscription);
    }

    private Observable<List<ItemType>> createObservable() {
        count++;
        count %= 6;
        return Observable.create(new Observable.OnSubscribe<List<ItemType>>() {
            @Override
            public void call(Subscriber<? super List<ItemType>> subscriber) {
                if (count == 3) {
                    subscriber.onError(new Throwable("on error"));
                    return;
                }
                if (count == 5) {
                    subscriber.onNext(new ArrayList<ItemType>());
                    return;
                }
                List<ItemType> mData = new ArrayList<>();
                for (int i = count * 5; i < count * 5 + 2; i++) {
                    if (i % 2 == 0) {

// Path: practicalrecyclerview/src/main/java/zlc/season/practicalrecyclerview/ItemType.java
// public interface ItemType {
//     int itemType();
// }


// Path: app/src/main/java/zlc/season/demo/multipleitem/MultiItemPresenter.java
import android.content.Context;
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.Observer;
import rx.Subscriber;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import rx.subscriptions.CompositeSubscription;
import zlc.season.practicalrecyclerview.ItemType;

                    public void onError(Throwable e) {
                        Log.w("SingleItemPresenter", e);
                        mView.onDataLoadFailed(isRefresh);
                    }

                    @Override
                    public void onNext(List<ItemType> list) {
                        mView.onDataLoadSuccess(list, isRefresh);
                    }
                });
        mSubscriptions.add(subscription);
    }

    private Observable<List<ItemType>> createObservable() {
        count++;
        count %= 6;
        return Observable.create(new Observable.OnSubscribe<List<ItemType>>() {
            @Override
            public void call(Subscriber<? super List<ItemType>> subscriber) {
                if (count == 3) {
                    subscriber.onError(new Throwable("on error"));
                    return;
                }
                if (count == 5) {
                    subscriber.onNext(new ArrayList<ItemType>());
                    return;
                }
                List<ItemType> mData = new ArrayList<>();
                for (int i = count * 5; i < count * 5 + 2; i++) {
                    if (i % 2 == 0) {

                        ItemType bean = new TypeOneBean("type one");
