title: Android ImageView's drawable tint not working
body: <p>I'm having problems with my ImageView. Btw, I'm using <a href="https://github.com/Pkmmte/CircularImageView" rel="nofollow">CircularImageView</a> which has a property app:selector_color.</p>
  
  <p>This is the scenario. ImageView has a drawable (src). What I want to happen is when I click on the ImageView, I want to add tint to it. </p>
  
  <p>This is what I've tried so far:</p>
  
  <pre><code>   viewHolder.ivProfile.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              result = data.get(position);
  
              int highlightColor = context.getResources().getColor(R.color.main_red_transparent);
              PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(highlightColor, PorterDuff.Mode.SRC_ATOP);
  
              CircularImageView ci = (CircularImageView) v;
  
              if (thumbnailsselection[position]) {
                  ci.setSelected(false);
                  thumbnailsselection[position] = false;
                  viewHolder.tvTitle.setVisibility(View.GONE);
              } else {
                  ci.setSelected(true);
                  ci.getDrawable().setColorFilter(highlightColor, PorterDuff.Mode.SRC_ATOP);
                  thumbnailsselection[position] = true;
                  viewHolder.tvTitle.setVisibility(View.VISIBLE);
                  viewHolder.tvTitle.setText(result.get(NAME));
              }
  
  
          }
      });
  </code></pre>
  
  <p>But this solution does not work. Anybody here tried this before? I would gladly appreciate any help. Thanks in advance!</p>