// 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;

package zlc.season.demo.multipleitem;




/**
 * Author: Season(ssseasonnn@gmail.com)
 * Date: 2016/10/10
 * Time: 12:07
 * FIXME
 */
public class MultiItemPresenter {
    private static int count = -1;
    private CompositeSubscription mSubscriptions;
    private MultiItemView mView;
    private Context mContext;

    MultiItemPresenter(Context context) {
        mContext = context;
        mSubscriptions = new CompositeSubscription();
    }

    void setDataLoadCallBack(MultiItemView itemView) {
        mView = itemView;
    }

    void unsubscribeAll() {
        mSubscriptions.clear();
    }

    void loadData(final boolean isRefresh) {
        Subscription subscription = createObservable()
                .subscribeOn(Schedulers.io())
                .delay(2, TimeUnit.SECONDS)
                .observeOn(AndroidSchedulers.mainThread())

// 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;

package zlc.season.demo.multipleitem;




/**
 * Author: Season(ssseasonnn@gmail.com)
 * Date: 2016/10/10
 * Time: 12:07
 * FIXME
 */
public class MultiItemPresenter {
    private static int count = -1;
    private CompositeSubscription mSubscriptions;
    private MultiItemView mView;
    private Context mContext;

    MultiItemPresenter(Context context) {
        mContext = context;
        mSubscriptions = new CompositeSubscription();
    }

    void setDataLoadCallBack(MultiItemView itemView) {
        mView = itemView;
    }

    void unsubscribeAll() {
        mSubscriptions.clear();
    }

    void loadData(final boolean isRefresh) {
        Subscription subscription = createObservable()
                .subscribeOn(Schedulers.io())
                .delay(2, TimeUnit.SECONDS)
                .observeOn(AndroidSchedulers.mainThread())

                .subscribe(new Observer<List<ItemType>>() {
