title: How to check RecycleView multiple item View Id in OnClick
body: <p>I want to do different job for different RecycleView item. I created custom OnClickListener for RecycleView and using this from my activity. But problem is when I want to get RecycleView Item Id form OnClick it's return -1. I can't able to check view Id.</p>
  
  <p><strong>RecycleView Adapter:</strong></p>
  
  <pre><code>    public class AddFoodAdapter extends  RecyclerView.Adapter&lt;AddFoodAdapter.AddFoodApapterVH&gt;{
      private ArrayList&lt;FoodReviewItem&gt; foodList = new ArrayList&lt;&gt;();
      OnItemClickListener onItemClickListener;
  
  
      public AddFoodAdapter(){
  
      }
  
      @Override
      public AddFoodApapterVH onCreateViewHolder(ViewGroup parent, int viewType) {
          View itemView = LayoutInflater.from(parent.getContext())
                  .inflate(R.layout.recycleview_add_food_item, parent, false);
  
          return new AddFoodApapterVH(itemView);
      }
  
      @Override
      public void onBindViewHolder(AddFoodApapterVH holder, int position) {
          holder.tvFoodTitle.setText(foodList.get(position).getFoodName());
          holder.tvFoodPrice.setText(foodList.get(position).getFoodPrice());
      }
  
      public void add(int position,FoodReviewItem foodItem){
          foodList.add(position,foodItem);
          notifyItemInserted(position);
      }
      public void delete(int position){
          foodList.remove(position);
          notifyItemRemoved(position);
      }
  
      @Override
      public int getItemCount() {
          return foodList.size();
      }
  
      public class AddFoodApapterVH extends RecyclerView.ViewHolder implements View.OnClickListener{
          public ImageView ivEditFoodItem;
          public TextView tvFoodTitle;
          public RatingBar rbFoodRating;
          public ImageView ivDeleteFoodItem;
          public TextView tvFoodPrice;
  
          public AddFoodApapterVH(View itemView) {
              super(itemView);
  
              ivEditFoodItem = (ImageView) itemView.findViewById(R.id.ivEditFoodItem);
              tvFoodTitle = (TextView) itemView.findViewById(R.id.tvAddFoodItemTitle);
              rbFoodRating = (RatingBar) itemView.findViewById(R.id.rbAddFoodItemRating);
              ivDeleteFoodItem = (ImageView) itemView.findViewById(R.id.ivDeleteFoodItem);
              tvFoodPrice = (TextView) itemView.findViewById(R.id.tvAddFoodItemPrice);
              itemView.setOnClickListener(this);
          }
  
          @Override
          public void onClick(View v) {
              if(onItemClickListener!=null){
                  onItemClickListener.onItemClick(v, getAdapterPosition());
              }
          }
      }
  
      public interface OnItemClickListener {
          public void onItemClick(View view , int position);
      }
  
      public void SetOnItemClickListener(final OnItemClickListener onItemClickListener){
          this.onItemClickListener = onItemClickListener;
      }
  
  }
  </code></pre>
  
  <p><strong>Form Activity:</strong></p>
  
  <pre><code>    private void setUpFoodItemApapter() {
          foodItemRecyclerView = (RecyclerView) findViewById(R.id.rvFoodItems);
          addFoodAdapter = new AddFoodAdapter();
          final LinearLayoutManager layoutManager = new org.solovyev.android.views.llm.LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
          foodItemRecyclerView.setLayoutManager(layoutManager);
          foodItemRecyclerView.addItemDecoration(new DividerItemDecoration(this, null));
          foodItemRecyclerView.setAdapter(addFoodAdapter);
          addFoodAdapter.SetOnItemClickListener(new AddFoodAdapter.OnItemClickListener() {
              @Override
              public void onItemClick(View view, int position) {
                  Log.i("getid",""+view.getId()); //return -1
                  Log.i("getid",""+R.id.ivDeleteFoodItem); //return id
  
                  // not working
                  if(view.getId() == R.id.ivDeleteFoodItem){
                      addFoodAdapter.delete(position);
                  }
              }
  
          });
      }
  </code></pre>