Cant resolve onClickListener 8.24

my code is the exact same as my book and android studio is complaining it cant resolve onClickListener
heres my code if thats any help.

 private class CrimeHolder extends RecyclerView.ViewHolder implements View.onClickListener // cant resolve it for some reason..

    private TextView mTitleTextView;
    private TextView mDateTextView;
    private Crime mCrime;

    @Override // method does not overide from its superclass
      public void onClick(View view){
        Toast.makeText(getActivity(),mCrime.getTitle()+ "Clicked!", Toast.LENGTH_SHORT).show();

    public void bind(Crime crime){
        mCrime =crime;

    public CrimeHolder(LayoutInflater inflater, ViewGroup parent){
        super(inflater.inflate(R.layout.list_item_crime, parent, false));

        itemView.setOnClickListener(this); // cannot be applied to (this)
        mTitleTextView = (TextView)
        mDateTextView = (TextView)



## Solved it

  • possible bug with Android Studio refusing to accept my typing off it. Instead it offered to implement it for me and that worked…