title: Get value from clicked item in recycler view
body: <p>I have a list of items. These data is received from a API and then listed trough a recycle view. This is how it looks now: <a href="https://imgur.com/a/h4mYXD6" rel="nofollow noreferrer">https://imgur.com/a/h4mYXD6</a></p>
  
  <p>When I press the heart on one of those items, I want to receive the data from that specific item. I'm not sure how do this. Right now I have created a listener to the heart icon, but now I'm stuck. I want to get the data which includes the name, the pictureURL and the expire date. </p>
  
  <p>I have a adapter in which I bind my data with the view. Here is the onCreateViewHolder:</p>
  
  <pre><code>@Override
  public FoodViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      //inflating and returning our view holder
      LayoutInflater inflater = LayoutInflater.from(mCtx);
      View view = inflater.inflate(R.layout.layout_food, parent, false);
      return new FoodViewHolder(view);
  }
  </code></pre>
  
  <p>This is my OnBindViewHolder-method:</p>
  
  <pre><code>@Override
  public void onBindViewHolder(FoodViewHolder holder, int position) {
      //getting the product of the specified position
      Food food = foodList.get(position);
  
      holder.heart.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v){
              switch (v.getId()) {
                  case R.id.heart:
  //what code do i write here???
  break;
              }
          }
      });
  </code></pre>
  
  <p>Is this the correct way to do it? Where do I go from here?</p>