title: How to set such a progress bar and set it's progress in java
body: <p>I am trying to set this progress bar not for a loading purpose .
  Is there a way to set it's colors in xml and it's progress in java.
  Finally thank you in advance.</p>
  
  <p><a href="https://i.stack.imgur.com/oAgEJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oAgEJ.png" alt="enter image description here"></a></p>