title: Android change color of ImageView / Bitmap
body: <p>I need to find a way to change the color of bitmap in Android. I need to replace/change colors of oval image smoothly in my application depending on <code>int</code> value. I need something like if <code>myValue=5</code> than change my image's color to <code>RED</code> and if <code>myValue=322</code> change color to <code>BLUE</code>. The only way which I find I can do this was using xml file which looks like this :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="oval" android:padding="10dp"&gt;
  &lt;!-- you can use any color you want I used here gray color--&gt;
   &lt;solid android:color="#cccccc"/&gt; 
      &lt;corners
       android:bottomRightRadius="10dp"
       android:bottomLeftRadius="10dp"
       android:topLeftRadius="10dp"
       android:topRightRadius="10dp"/&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>and after that when <code>myValue</code> is changing to set my <code>ImageView</code> image resource. But in this way I have to create 35 different xml files...which I don't think is a good idea.</p>
  
  <p>So anyone who can suggest better solution to do this?</p>