title: Getting an adapter instance from a ViewHolder
body: <p>I'm trying to create a contextual floating menu with the information (position,id,etc) of the selected menu to be accessible inside the overridden method <code>onContextItemSelected</code> in my Fragment.</p>
  
  <p>So I have a custom adapter extending from <code>RecyclerView.Adapter&lt;ViewHolder&gt;</code> and a custom <code>ViewHolder</code> class in separate file.
  I registered my click listener and provided its handler inside the custom <code>ViewHolder</code> class. </p>
  
  <p>Since I need to send the <code>ViewHolder</code> information back to my Fragment when the event is fired, I need to have a reference to my Adapter because my fragment has the <code>adapter object reference</code> but not <code>viewholder object reference</code>. So in instantiation stage of the custom <code>ViewHolder</code> (because there is no method to get Adapter reference from <code>ViewHolder</code> class), I pass the adapter reference to constructor of the custom <code>ViewHolder</code>  for the use in its handler so I can call this reference inside the <code>ViewHolder</code> class to pass the information to <code>Adapter</code> from <code>ViewHolder</code>, and finally from <code>Adapter</code> to <code>Fragment</code>. </p>
  
  <p>My question is, is there a better practice or a general approach by still keeping the handler inside the <code>ViewHolder</code>? In my case, I notice every ViewHolder instance will have to keep a reference to adapter, which consumes memory. Is there any conflict that may arise in the future by doing it the way I listed above?</p>