title: How to differentiate click event between views in adapter?
body: <p>I have a <code>RecyclerView</code> with a custom view inflated for each items. This custom view contains only a favorite <code>ImageView</code>. I set the onclick in my holder class as follows:</p>
  
  <pre><code>class DataViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
      private OnItemViewClickListener onItemViewClickListener;
      private OnFavoriteImageViewClickListener onFavoriteImageViewClickListener;
      private ImageView favoriteImageView;
  
      DataViewHolder(View itemView, OnItemViewClickListener onItemViewClickListener,
                      OnFavoriteImageViewClickListener onFavoriteImageViewClickListener) {
          super(itemView);
          this.onItemViewClickListener = onItemViewClickListener;
          itemView.setOnClickListener(this);
          favoriteImageView = itemView.findViewById(R.id.favorite_image_view);
          this.onFavoriteImageViewClickListener = onFavoriteImageViewClickListener;
          favoriteImageView.setOnClickListener(this);
      }
  
      void bindData(Data data) {
          //Bind data to views
      }
  
      @Override
      public void onClick(View v) {
          int position = getAdapterPosition();
          Data clickedData = getItem(position);
          onItemViewClickListener.onItemViewClick(clickedData);
          onFavoriteImageViewClickListener.onFavoriteImageViewClick(clickedData);
      }
  }
  
  public interface OnItemViewClickListener {
      void onItemViewClick(Data data);
  }
  
  public interface OnFavoriteImageViewClickListener {
      void onFavoriteImageViewClick(Data data);
  }
  </code></pre>
  
  <p>As you can see, I once set the click listener on the entire view and once on the image view. The problem is that when I click the <code>ImageView</code> both click events are triggered, that one one the entire view and the second on the <code>ImageView</code>. Hot to stop the first one (on the entire view) and remain only the one the <code>ImageView</code>? Thanks!</p>