anastr / SpeedView

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

`sv_speedTextFormat ` is not available as an option in code #245

Closed bastianpedersen closed 1 year ago

bastianpedersen commented 1 year ago

Describe the bug The XML attribute sv_speedTextFormat is not available in the code.

anastr commented 1 year ago

Please make sure you are using the latest version of the library. You can change the speed text format from the XML like the following:

app:sv_speedTextFormat="INTEGER"

Or in your code use the listener:

speedometer.speedTextListener = { speed -> "Speed is $speed" }
bastianpedersen commented 1 year ago

I'm sorry, then it's me who has misunderstood. I didn't know that I needed to use an event listener like the one in your example. Thanks.