anastr / SpeedView

Dynamic Speedometer and Gauge for Android. amazing, powerful, and multi shape :zap:
Apache License 2.0
1.3k stars 324 forks source link

Identify the indicator section #222

Closed vedraj360 closed 3 years ago

vedraj360 commented 3 years ago

Hi, Thanks for making this library.

  1. I have a question is there a way to identify the indicator will be in which section.
  2. I have to show some initial value and my pointer can be +- to the initial value and this value should always background of yellow. For eg if min = 0 ; max will be 10 x initial value = 1000 and pointer value is 1100. So how to set initial value background always yellow. Can you help me out.
anastr commented 3 years ago

So you need to have your initial value in a specific section. If your section has a range of 0.5 to 0.7 you need to set pointer at 50%. You can use this.

// move indicator to percent value (50%)
speedometer.speedPercentTo(50)
vedraj360 commented 3 years ago

I just exported the library to make some modification according to the required use case. Once again thanks for this library saved a lot of time.