package io.doist.recyclerviewext.click_listeners;

import android.support.v7.widget.RecyclerView;
import android.view.View;

public class ClickableViewHolder extends RecyclerView.ViewHolder {
    public ClickableViewHolder(View itemView, OnItemClickListener onItemClickListener,
                               OnItemLongClickListener onItemLongClickListener) {
        super(itemView);

        setClickListeners(onItemClickListener, onItemLongClickListener);
    }

    private void setClickListeners(final OnItemClickListener onItemClickListener,
                                   final OnItemLongClickListener onItemLongClickListener) {
        if (onItemClickListener != null) {
            itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    onItemClickListener.onItemClick(ClickableViewHolder.this);
                }
            });
        }

        if (onItemLongClickListener != null) {
            itemView.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View v) {
                    onItemLongClickListener.onItemLongClick(ClickableViewHolder.this);
                    return true;
                }
            });
        }
    }
}

@@ -185,16 +185,163 @@
 older %7B%0A
+    public ClickableViewHolder(View itemView, OnItemClickListener onItemClickListener) %7B%0A        this(itemView, onItemClickListener, null);%0A    %7D%0A%0A
     publ

Add extra constructor for backwards compatibility