title: Single selection recyclerView not working in fragment
body: <p>I'm using <code>singleSelection recyclerView</code> it was working correct in <code>activity</code> but when i conevert it <code>activity</code> to <code>fragment</code> it's showing me <strong>error</strong> like <a href="https://i.stack.imgur.com/c3s23.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c3s23.png" alt="this"></a></p>
  
  <p><strong>I'm using this code in freagment</strong></p>
  
  <pre><code>public class HomeworkFragment extends Fragment implements HomeworkAdapter.SingleClickListener
  </code></pre>
  
  <p>.</p>
  
  <pre><code>adapter = new HomeworkAdapter(view.getContext(), productList);
                          adapter.setOnItemClickListener(view.getContext()); //error here
                          recyclerView.setAdapter(adapter); 
  </code></pre>
  
  <p>.</p>
  
  <pre><code> @Override
      public void onItemClickListener(int position, View view) {
          adapter.selectedItem();
      }
  </code></pre>
  
  <p><strong>This code in Adapter</strong></p>
  
  <pre><code>private static SingleClickListener sClickListener;
  
  
   public void setOnItemClickListener(SingleClickListener clickListener) {
          sClickListener = clickListener;
      }
  
      public interface SingleClickListener {
          void onItemClickListener(int position, View view);
      }
  </code></pre>
  
  <p>I don't know what is the problem but i tries only fewThings like <code>getActivity()</code>, <code>view.getContext()</code> but nothing works</p>
  
  <p>When it was in activity I was doing this <code>adapter.setOnItemClickListener(HomeworkActivity.this);</code> it was working fine in activity</p>
  
  <p>Thanks in advance!</p>
  
  <p>Happy coding!</p>