title: How to handle Itemclick listener recyclerview
body: <p>I am using Recyclerview for menu category and I want to handle item click listener to start other activity with put extra, please any one have experience about this answer my question.</p>
  
  <p>the bellow are my code java. if posible I want to put click listener in ProductCategory.class because I want to use this module(ProductServiceCategoryContractor, ProductServiceCategoryAdapter) many time.</p>
  
  <p>ProductServiceCategoryContractor.java (properties)</p>
  
  <pre><code>public class ProductServiceCategoryContractor {
      private int img;
  
      public ProductServiceCategoryContractor(String title) {
          this.title = title;
      }
  
      private String title;
  
      public ProductServiceCategoryContractor(int img, String title) {
          this.img = img;
          this.title = title;
      }
  
      public int getImg() {
          return img;
      }
  
      public void setImg(int img) {
          this.img = img;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  }
  </code></pre>
  
  <p>ProductServiceCategoryAdapter.java</p>
  
  <pre><code>public class ProductServiceCategoryAdapter extends RecyclerView.Adapter&lt;ProductServiceCategoryAdapter.MyViewHolder&gt; {
      private Context mContext;
      private List&lt;ProductServiceCategoryContractor&gt; albumList;
      public class MyViewHolder extends RecyclerView.ViewHolder {
          public LinearLayout layout;
          public ImageView img;
          public TextView title;
          public MyViewHolder(View view) {
              super(view);
              title = (TextView) view.findViewById(R.id.title);
              img = (ImageView) view.findViewById(R.id.img);
              layout=(LinearLayout) view.findViewById(R.id.layout);
          }
      }
      public ProductServiceCategoryAdapter(Context mContext, List&lt;ProductServiceCategoryContractor&gt; albumList) {
          this.mContext = mContext;
          this.albumList = albumList;
      }
      @Override
      public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View itemView = LayoutInflater.from(parent.getContext())
                  .inflate(R.layout.product_menu_model, parent, false);
          return new MyViewHolder(itemView);
      }
      @Override
      public void onBindViewHolder(final MyViewHolder holder, int position) {
          ProductServiceCategoryContractor album = albumList.get(position);
          holder.title.setText(album.getTitle());
          Glide.with(mContext).load(album.getImg()).into(holder.img);
      }
      @Override
      public int getItemCount() {
          return albumList.size();
      }
  }
  </code></pre>
  
  <p>ProductCategory.java</p>
  
  <pre><code>public class ProductCategory extends AppCompatActivity {
      private RecyclerView recyclerView;
      private ProductServiceCategoryAdapter adapter;
      private List&lt;ProductServiceCategoryContractor&gt; albumList;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_product_category);
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
          getSupportActionBar().setDisplayHomeAsUpEnabled(true);
          getSupportActionBar().setDisplayShowHomeEnabled(true);
          recyclerView = (RecyclerView) findViewById(R.id.product_category);
          albumList = new ArrayList&lt;&gt;();
          adapter = new ProductServiceCategoryAdapter(this, albumList);
          RecyclerView.LayoutManager mLayoutManager = new GridLayoutManager(this, 1);
          recyclerView.setLayoutManager(mLayoutManager);
          recyclerView.setItemAnimator(new DefaultItemAnimator());
          recyclerView.setAdapter(adapter);
          prepareAlbums();
      }
      private void prepareAlbums() {
          int[] covers = new int[]{
                  R.mipmap.ic_launcher
          };
          ProductServiceCategoryContractor pl_list = new ProductServiceCategoryContractor(covers[0], "Phone Spare parts &amp; Accessory");
          albumList.add(pl_list);
          pl_list = new ProductServiceCategoryContractor(covers[0], "Computer Networking");
          albumList.add(pl_list);
          pl_list = new ProductServiceCategoryContractor("Clothing Accessory");
          albumList.add(pl_list);
          adapter.notifyDataSetChanged();
      }
      @Override
      public boolean onSupportNavigateUp(){
          finish();
          return true;
      }
  }
  </code></pre>