// Path: library/src/main/java/com/dreamliner/rvhelper/interfaces/OnItemClickListener.java
// public interface OnItemClickListener<T> {
//     void onItemClick(View v, int position, T t);
// }
// 
// Path: library/src/main/java/com/dreamliner/rvhelper/interfaces/OnItemLongClickListener.java
// public interface OnItemLongClickListener<T> {
//     boolean onItemLongClick(View v, int position, T t);
// }
// 
// Path: library/src/main/java/com/dreamliner/rvhelper/viewholder/BaseBindViewHolder.java
// public class BaseBindViewHolder<Binding extends ViewDataBinding, T> extends RecyclerView.ViewHolder implements View.OnClickListener,
//         View.OnLongClickListener {
// 
//     private final Binding mBinding;
// 
//     private T mItem;
//     private OnItemClickListener<T> mOnItemClickListener;
//     private OnItemLongClickListener<T> mOnItemLongClickListener;
// 
//     public BaseBindViewHolder(Binding binding) {
//         super(binding.getRoot());
//         mBinding = binding;
//     }
// 
//     public Binding getBinding() {
//         return mBinding;
//     }
// 
//     @Override
//     public void onClick(View v) {
//         if (null != mOnItemClickListener) {
//             int position = getAdapterPosition();
//             if (position != RecyclerView.NO_POSITION) {
//                 mOnItemClickListener.onItemClick(v, position, mItem);
//             }
//         }
//     }
// 
//     @Override
//     public boolean onLongClick(View v) {
//         if (null != mOnItemLongClickListener) {
//             int position = getAdapterPosition();
//             return position == RecyclerView.NO_POSITION || mOnItemLongClickListener.onItemLongClick(v, position, mItem);
//         }
//         return false;
//     }
// 
//     public void setItem(T item) {
//         mItem = item;
//     }
// 
//     public void setOnItemClickListener(OnItemClickListener<T> onItemClickListener) {
//         mOnItemClickListener = onItemClickListener;
//     }
// 
//     public void setOnItemLongClickListener(OnItemLongClickListener<T> onItemLongClickListener) {
//         mOnItemLongClickListener = onItemLongClickListener;
//     }
// }


import android.util.SparseIntArray;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import com.dreamliner.lib.rvhelper.R;
import com.dreamliner.rvhelper.interfaces.OnItemClickListener;
import com.dreamliner.rvhelper.interfaces.OnItemLongClickListener;
import com.dreamliner.rvhelper.viewholder.BaseBindViewHolder;
import androidx.annotation.LayoutRes;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
package com.dreamliner.rvhelper.adapter;




/**
 * @author chenzj
 * @Title: BaseAdapter
 * @Description: 类的描述 -
 * @date 2016/6/12 09:05
 * @email admin@chenzhongjin.cn
 */
public class BaseMixtureDBAdapter<T> extends BaseDataDBAdapter<T> {

    private static final int NO_FOUND_TYPE = -1;

    private SparseIntArray mItemTypeToLayoutMap = new SparseIntArray();

    public BaseMixtureDBAdapter(SparseIntArray itemTypeToLayoutMap) {
        super();
        mItemTypeToLayoutMap = itemTypeToLayoutMap;
    }

// Path: library/src/main/java/com/dreamliner/rvhelper/interfaces/OnItemClickListener.java
// public interface OnItemClickListener<T> {
//     void onItemClick(View v, int position, T t);
// }
// 
// Path: library/src/main/java/com/dreamliner/rvhelper/interfaces/OnItemLongClickListener.java
// public interface OnItemLongClickListener<T> {
//     boolean onItemLongClick(View v, int position, T t);
// }
// 
// Path: library/src/main/java/com/dreamliner/rvhelper/viewholder/BaseBindViewHolder.java
// public class BaseBindViewHolder<Binding extends ViewDataBinding, T> extends RecyclerView.ViewHolder implements View.OnClickListener,
//         View.OnLongClickListener {
// 
//     private final Binding mBinding;
// 
//     private T mItem;
//     private OnItemClickListener<T> mOnItemClickListener;
//     private OnItemLongClickListener<T> mOnItemLongClickListener;
// 
//     public BaseBindViewHolder(Binding binding) {
//         super(binding.getRoot());
//         mBinding = binding;
//     }
// 
//     public Binding getBinding() {
//         return mBinding;
//     }
// 
//     @Override
//     public void onClick(View v) {
//         if (null != mOnItemClickListener) {
//             int position = getAdapterPosition();
//             if (position != RecyclerView.NO_POSITION) {
//                 mOnItemClickListener.onItemClick(v, position, mItem);
//             }
//         }
//     }
// 
//     @Override
//     public boolean onLongClick(View v) {
//         if (null != mOnItemLongClickListener) {
//             int position = getAdapterPosition();
//             return position == RecyclerView.NO_POSITION || mOnItemLongClickListener.onItemLongClick(v, position, mItem);
//         }
//         return false;
//     }
// 
//     public void setItem(T item) {
//         mItem = item;
//     }
// 
//     public void setOnItemClickListener(OnItemClickListener<T> onItemClickListener) {
//         mOnItemClickListener = onItemClickListener;
//     }
// 
//     public void setOnItemLongClickListener(OnItemLongClickListener<T> onItemLongClickListener) {
//         mOnItemLongClickListener = onItemLongClickListener;
//     }
// }


// Path: library/src/main/java/com/dreamliner/rvhelper/adapter/BaseMixtureDBAdapter.java
import android.util.SparseIntArray;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import com.dreamliner.lib.rvhelper.R;
import com.dreamliner.rvhelper.interfaces.OnItemClickListener;
import com.dreamliner.rvhelper.interfaces.OnItemLongClickListener;
import com.dreamliner.rvhelper.viewholder.BaseBindViewHolder;
import androidx.annotation.LayoutRes;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;

package com.dreamliner.rvhelper.adapter;




/**
 * @author chenzj
 * @Title: BaseAdapter
 * @Description: 类的描述 -
 * @date 2016/6/12 09:05
 * @email admin@chenzhongjin.cn
 */
public class BaseMixtureDBAdapter<T> extends BaseDataDBAdapter<T> {

    private static final int NO_FOUND_TYPE = -1;

    private SparseIntArray mItemTypeToLayoutMap = new SparseIntArray();

    public BaseMixtureDBAdapter(SparseIntArray itemTypeToLayoutMap) {
        super();
        mItemTypeToLayoutMap = itemTypeToLayoutMap;
    }

    public BaseMixtureDBAdapter(OnItemClickListener<T> onItemClickListener, SparseIntArray itemTypeToLayoutMap) {