title: Changing color of single drawable in RecyclerView will change all drawables
body: <p>I just tried to change the color of my drawable inside my row depending on a value but instead of one drawable the adapter changed all of them.</p>
  
  <p>Here is my Adapter:</p>
  
  <pre><code>public class ReportAdapter extends RecyclerView.Adapter&lt;ReportAdapter.ReportViewHolder&gt; {
  
      DataBaseHelper dataBase;
  
      private LayoutInflater inflater;
      List&lt;ChoosedSubject&gt; data = Collections.emptyList();
      Context context;
      OnItemClickListener itemClickListener;
  
      public ReportAdapter(Context context, List&lt;ChoosedSubject&gt; data, OnItemClickListener itemClickListener) {
          inflater = LayoutInflater.from(context);
          this.data = data;
          this.context = context;
          this.itemClickListener = itemClickListener;
      }
  
      @Override
      public ReportViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View view = inflater.inflate(R.layout.report_cell, parent, false);
          ReportViewHolder holder = new ReportViewHolder(view);
  
          dataBase = new DataBaseHelper(context);
  
          return holder;
      }
  
      //Set Data inside RecyclerView
      @Override
      public void onBindViewHolder(ReportViewHolder holder, int position) {
          ChoosedSubject current = data.get(position);
          Grades grades = new Grades(context);
  
          Resources resources = context.getResources();
          int iconColor;
          Drawable icon;
  
          icon = ContextCompat.getDrawable(context, dataBase.getSpecificChoosedSubjectAppendingToName(current.getName()).get(0).getChoosedIcon());
  
          if (dataBase.getSpecificChoosedSubjectAppendingToName(current.getName()).get(0).getChoosedIcon() != R.drawable.subject_default) {
              iconColor = resources.getColor(dataBase.getSpecificChoosedSubjectAppendingToName(current.getName()).get(0).getChoosedColor());
              icon.setColorFilter(iconColor, PorterDuff.Mode.SRC_IN);
              holder.icon.setBackground(icon);
          } else {
              holder.icon.setImageResource(R.drawable.subject_default);
          }
  
          holder.subject.setText(current.getName().toString());
  
          NumberFormat formatter = NumberFormat.getNumberInstance();
          formatter.setMinimumFractionDigits(0);
          formatter.setMaximumFractionDigits(0);
          String output = formatter.format(dataBase.getSpecificChoosedSubjectAppendingToName(current.getName()).get(0).getAverage());
  
          int formattedValue = Integer.valueOf(output);
  
  
          //CHANGING COLOR DEPENDING ON VALUE
          int boxColor = 0;
          Drawable box = ContextCompat.getDrawable(context, R.drawable.markbox);
          Drawable boxBorder = ContextCompat.getDrawable(context, R.drawable.markbox_border);
  
          if (formattedValue &gt;= 10) {
              boxColor = resources.getColor(R.color.positive);
          } else if (formattedValue &gt;= 4 &amp;&amp; formattedValue &lt;= 9) {
              boxColor = resources.getColor(R.color.neutral);
          } else if (formattedValue &lt; 4) {
              boxColor = resources.getColor(R.color.negative);
  
          }
  
          box.setAlpha(204);
          box.setColorFilter(boxColor, PorterDuff.Mode.SRC_IN);
          boxBorder.setColorFilter(boxColor, PorterDuff.Mode.SRC_IN);
  
          holder.markbox.setImageDrawable(box);
          holder.markboxBorder.setImageDrawable(boxBorder);
  
  
          holder.average.setText(output);
          holder.average.setTypeface(EasyFonts.robotoBlack(context));
      }
  
      @Override
      public int getItemCount() {
          return data.size();
      }
  
  
      public class ReportViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
  
          TextView subject;
          ImageView icon;
          ImageView markbox;
          ImageView markboxBorder;
          TextView average;
  
          public ReportViewHolder(View itemView) {
              super(itemView);
              subject = (TextView) itemView.findViewById(R.id.report_subject);
              icon = (ImageView) itemView.findViewById(R.id.report_icon);
              markbox = (ImageView) itemView.findViewById(R.id.report_markbox);
              markboxBorder = (ImageView) itemView.findViewById(R.id.report_markbox_border);
              average = (TextView) itemView.findViewById(R.id.report_average);
  
              itemView.setOnClickListener(this);
          }
  
          @Override
          public void onClick(View v) {
              itemClickListener.onItemClick(v, this.getAdapterPosition());
          }
  
      }
  
  }
  </code></pre>
  
  <p>Knows anybody what to do? Thank you for your help!!!</p>