Closed Drjacky closed 5 years ago
It works when I set the medium percentage first, then the low percentage:
speedView.setMediumSpeedPercent(miniCompletionRate + 2)
speedView.setLowSpeedPercent(miniCompletionRate)
The solution is we have to define Medium and Low percentages on XML, then set them programmatically. Otherwise, we get the error.
Technically, default value of Low/Medium percent are 60/87. When you change lowSpeedPercent first to '90' it will throw the exception above, because lowSpeedPercent '90' is bigger than mediumSpeedPercent '87'.
I've set the minimum percentage to 90 and the medium percentage to 92 and the max percentage is 100, But still getting this error:
When I set it through XML, it works. But when I set it programmatically like this, it doesn't work: