Recyclerview on click null object reference
<p>My adaptor:</p>

<pre><code>public class Adaptor extends RecyclerView.Adapter&lt;Adaptor.Holder&gt;{

private ArrayList&lt;Winkel&gt; winkels;
private LayoutInflater inflater;
private ImageView icon;
private ItemCLickCallback itemCLickCallback;

public interface ItemCLickCallback {
    void onItemClick(int p);
    void onSecItemClick(int p);

}

public void setItemCLickCallback(final ItemCLickCallback itemCLickCallback1){
    this.itemCLickCallback = itemCLickCallback;
}

public Adaptor (ArrayList&lt;Winkel&gt; winkels,Context c){
    this.inflater = LayoutInflater.from(c);
    this.winkels = winkels;
}


@Override
public Holder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view = inflater.inflate(R.layout.card_item, parent, false);
    return new Holder(view);
}

@Override
public void onBindViewHolder(Holder holder, int position) {
    Winkel winkel = winkels.get(position);
    holder.title.setText(winkel.getNaam());
    if (winkel.isFavourtite()){
        holder.icon.setImageResource(R.drawable.ic_star_black_18dp);
    }
    else{
        holder.icon.setImageResource(R.drawable.ic_star_border_black_18dp);
    }

}

@Override
public int getItemCount() {

    return winkels.size();
}

class Holder extends RecyclerView.ViewHolder implements View.OnClickListener{

    private TextView title;
    private View container;
    private ImageView icon;

    public Holder(View itemView) {
        super(itemView);

        title = (TextView)itemView.findViewById(R.id.lbl_item_text);
        container = itemView.findViewById(R.id.cont_item_root);
        icon = (ImageView) itemView.findViewById(R.id.im_item_icon_secondary);
        icon.setOnClickListener(this);
        container.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if(v.getId()==R.id.cont_item_root){
            Log.d("lol",Integer.toString(getAdapterPosition()));
            itemCLickCallback.onItemClick(getAdapterPosition());

        }
        else{
            itemCLickCallback.onSecItemClick(getAdapterPosition());
        }
    }
}
}
</code></pre>

<p>My overview fragment:</p>

<pre><code>@Override
public void onItemClick(int p) {
    Log.d("lol",(Integer.toString(p)));
    Winkel winkel = (Winkel) mijnwinkels.get(p);

    Bundle detailsBundle = new Bundle();
    detailsBundle.putString(DETAILS_NAAM,winkel.getNaam());
    detailsBundle.putString(DETAILS_ADRES,winkel.getAdres());
    detailsBundle.putString(DETAILS_DEELGEMEENTE,winkel.getDeelGemeente());
    detailsBundle.putString(DETAILS_GEMEENTE,winkel.getGemeente());
    detailsBundle.putString(DETAILS_POSTCODE,winkel.getPostcode());

    Details detail= new Details();
    detail.setArguments(detailsBundle);
    this.getFragmentManager().beginTransaction()
            .replace(R.id.details,detail,null)
            .addToBackStack(null)
            .commit();
}
</code></pre>

<p>Error message:</p>

<pre><code>java.lang.NullPointerException: Attempt to invoke interface method 'void com.example.hoofdgebruiker.winkelskortrijk.Utill.Adaptor$ItemCLickCallback.onItemClick(int)' on a null object reference.
</code></pre>

<p>My code is working up to the point where I get me recyclerview, the items are in it, but I can't click any of them without getting this error and I don't understand why. What am I doing wrong that it is a null object reference? Neither of my logs are showing up.</p>

<p>Edit: my method onItemCLickCallback is used here:</p>

<pre><code>@Override
public void onSuccess(ArrayList&lt;Winkel&gt; winkels) {
    mijnwinkels = winkels;
    Adaptor adaptor = new Adaptor(mijnwinkels, this.getActivity());
    mRecyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity()));
    mRecyclerView.addItemDecoration(new VerticalSpace(30));
    mRecyclerView.setAdapter(adaptor);
    adaptor.setItemCLickCallback(this);
}
</code></pre>