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

Speed formatting in locale specific manner not possible #173

Closed chpasha closed 4 years ago

chpasha commented 4 years ago

The title say it all - I want to format the values (that are not actually a speed, but rather a mileage, so very big) in locale specific way, for instance 38.000 for German locale but I don't see any possibility for this. The function getSpeedText that returns "formatted" text can only format the number as scientific float and we can influence only the number of decimal positions. And it cannot be overwritten via inheritance (still kind of dumb to create a class to just overwrite main label formatting). It would be nice if there were a possibility to supply a format like with ticks OR at least use NumberFormat classes to properly format the values by default in locale friendly manner for FLOAT and INTEGER speedTextFormat

chpasha commented 4 years ago

P. S. I don't know Kotlin at all, so maybe I've overlooked some workaround (or direct) possibility to specify label format

anastr commented 4 years ago

Thanks for reporting, this should be added long time ago.

anastr commented 4 years ago

done, with SpeedTextListener. new version c93b5e1.