// Path: library/src/main/java/com/freelib/multiitem/adapter/holder/BaseViewHolder.java
// public class BaseViewHolder extends RecyclerView.ViewHolder {
//     public ViewHolderManager viewHolderManager;
//     public Object itemData;
// 
// 
//     public BaseViewHolder(View itemView) {
//         super(itemView);
//     }
// 
// 
//     public Object getItemData() {
//         return itemData;
//     }
// 
//     /**
//      * header和footer的个数也计算在内
//      * {@link #getAdapterPosition()}
//      */
//     public int getItemPosition() {
//         return getAdapterPosition();
//     }
// 
//     public ViewHolderManager getViewHolderManager() {
//         return viewHolderManager;
//     }
// 
// }


import android.animation.Animator;
import android.support.annotation.NonNull;
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;
import com.freelib.multiitem.adapter.holder.BaseViewHolder;
package com.freelib.multiitem.animation;




/**
 * 动画Loader，处理动画逻辑
 * Created by free46000 on 2017/5/22.
 */
public class AnimationLoader {
    protected int lastAnimIndex = -1;
    protected boolean isAnimEnable;
    protected boolean isShowAnimWhenFirst;
    protected BaseAnimation animation;
    protected long animDuration = 400L;
    protected Interpolator interpolator = new LinearInterpolator();


    public void clear() {
        lastAnimIndex = -1;
    }

    /**
     * 打开加载动画
     *
     * @param animation               BaseAnimation
     * @param isShowAnimWhenFirstLoad 是否只有在第一次展示的时候才使用动画
     */
    public void enableLoadAnimation(@NonNull BaseAnimation animation, boolean isShowAnimWhenFirstLoad) {
        this.isAnimEnable = true;
        this.isShowAnimWhenFirst = isShowAnimWhenFirstLoad;
        this.animation = animation == null ? new SlideInLeftAnimation() : animation;
    }


    /**
     * 根据条件开启动画
     *
     * @param holder BaseViewHolder
     */
// Path: library/src/main/java/com/freelib/multiitem/adapter/holder/BaseViewHolder.java
// public class BaseViewHolder extends RecyclerView.ViewHolder {
//     public ViewHolderManager viewHolderManager;
//     public Object itemData;
// 
// 
//     public BaseViewHolder(View itemView) {
//         super(itemView);
//     }
// 
// 
//     public Object getItemData() {
//         return itemData;
//     }
// 
//     /**
//      * header和footer的个数也计算在内
//      * {@link #getAdapterPosition()}
//      */
//     public int getItemPosition() {
//         return getAdapterPosition();
//     }
// 
//     public ViewHolderManager getViewHolderManager() {
//         return viewHolderManager;
//     }
// 
// }


// Path: library/src/main/java/com/freelib/multiitem/animation/AnimationLoader.java
import android.animation.Animator;
import android.support.annotation.NonNull;
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;
import com.freelib.multiitem.adapter.holder.BaseViewHolder;

package com.freelib.multiitem.animation;




/**
 * 动画Loader，处理动画逻辑
 * Created by free46000 on 2017/5/22.
 */
public class AnimationLoader {
    protected int lastAnimIndex = -1;
    protected boolean isAnimEnable;
    protected boolean isShowAnimWhenFirst;
    protected BaseAnimation animation;
    protected long animDuration = 400L;
    protected Interpolator interpolator = new LinearInterpolator();


    public void clear() {
        lastAnimIndex = -1;
    }

    /**
     * 打开加载动画
     *
     * @param animation               BaseAnimation
     * @param isShowAnimWhenFirstLoad 是否只有在第一次展示的时候才使用动画
     */
    public void enableLoadAnimation(@NonNull BaseAnimation animation, boolean isShowAnimWhenFirstLoad) {
        this.isAnimEnable = true;
        this.isShowAnimWhenFirst = isShowAnimWhenFirstLoad;
        this.animation = animation == null ? new SlideInLeftAnimation() : animation;
    }


    /**
     * 根据条件开启动画
     *
     * @param holder BaseViewHolder
     */
    public void startAnimation(@NonNull BaseViewHolder holder) {