Horizontal progressive gauge in android

I am working on a Horizontal progress bar, Here I am facing difficulties with creating it. I have a reference image attached with this.

The progress bar has the below criteria,

1) The progress colour needs to be changed it crosses certain progress. Ex: if progress < 60 then green, progress > 60 && < 90 then orange and progress >90 then red. 2) The progress bar is segmented.

Could please anyone suggests to me how to achieve the above? or please share any reference to achieve this.

Thank you
guage