// 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 androidx.recyclerview.widget.RecyclerView;
import com.dreamliner.lib.rvhelper.BR;
import com.dreamliner.rvhelper.interfaces.OnItemClickListener;
import com.dreamliner.rvhelper.interfaces.OnItemLongClickListener;
import com.dreamliner.rvhelper.viewholder.BaseBindViewHolder;
package com.dreamliner.rvhelper.adapter;



/**
 * Created by chenzj on 2017/3/15.
 */

public abstract class BaseDataDBAdapter<T> extends BaseDataAdapter<T, BaseBindViewHolder> {

    //DataBinding相关点击接口
    private OnItemClickListener<T> mOnItemClickListener;
    private OnItemLongClickListener<T> mOnItemLongClickListener;

    private Decorator mDecorator;

    public BaseDataDBAdapter() {
        super();
    }

    public BaseDataDBAdapter(OnItemClickListener<T> onItemClickListener) {
        super();
        mOnItemClickListener = onItemClickListener;
    }

    public BaseDataDBAdapter(OnItemLongClickListener<T> onItemLongClickListener) {
        super();
        mOnItemLongClickListener = onItemLongClickListener;
    }

// 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/BaseDataDBAdapter.java
import androidx.recyclerview.widget.RecyclerView;
import com.dreamliner.lib.rvhelper.BR;
import com.dreamliner.rvhelper.interfaces.OnItemClickListener;
import com.dreamliner.rvhelper.interfaces.OnItemLongClickListener;
import com.dreamliner.rvhelper.viewholder.BaseBindViewHolder;

package com.dreamliner.rvhelper.adapter;



/**
 * Created by chenzj on 2017/3/15.
 */

public abstract class BaseDataDBAdapter<T> extends BaseDataAdapter<T, BaseBindViewHolder> {

    //DataBinding相关点击接口
    private OnItemClickListener<T> mOnItemClickListener;
    private OnItemLongClickListener<T> mOnItemLongClickListener;

    private Decorator mDecorator;

    public BaseDataDBAdapter() {
        super();
    }

    public BaseDataDBAdapter(OnItemClickListener<T> onItemClickListener) {
        super();
        mOnItemClickListener = onItemClickListener;
    }

    public BaseDataDBAdapter(OnItemLongClickListener<T> onItemLongClickListener) {
        super();
        mOnItemLongClickListener = onItemLongClickListener;
    }

    public BaseDataDBAdapter(OnItemClickListener<T> onItemClickListener, OnItemLongClickListener<T> onItemLongClickListener) {