title: Set Progress Bar tint before API 21
body: <p>I'm trying to change the Progress Bar tint without using <code>setProgressTintList</code> method, as this method requires API 21. </p>
  
  <p>For example clicking a button should change between this two modes:  </p>
  
  <p><a href="https://i.stack.imgur.com/KHNIu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KHNIu.png" alt="before"></a> 
  <a href="https://i.stack.imgur.com/l5eL5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/l5eL5.png" alt="after"></a></p>
  
  <p>My code:   </p>
  
  <pre><code>    int[][] states = new int[][] {
              new int[] { android.R.attr.state_enabled}, // enabled
              new int[] {-android.R.attr.state_enabled}, // disabled
              new int[] {-android.R.attr.state_checked}, // unchecked
              new int[] { android.R.attr.state_pressed}  // pressed
      };
  
  
  
      int[] colors = new int[] {
              getResources().getColor(R.color.my_color),
              getResources().getColor(R.color.my_color),
              getResources().getColor(R.color.my_color),
              getResources().getColor(R.color.my_color)
      };
  
      ColorStateList myList = new ColorStateList(states, colors);
  
      ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.recording_progress);
  
      simpleProgressBar.setProgressTintList(myList);
  </code></pre>