Pygmalion69 / Gauge

A Gauge View for Android
Apache License 2.0
68 stars 26 forks source link

Set Max Value Programmatically #5

Closed marloncarvalho closed 6 years ago

marloncarvalho commented 6 years ago

First of all, really thanks for this library. I'm also using it in my IoT project and it fits perfectly. However, there's a use case where I need to set the max value programmatically and couldn't find a way to do that. I would like to know if it's a simple feature to be implemented or it requires too much effort.

Pygmalion69 commented 6 years ago

Thanks for your feedback. I've added some setters for the scale values. Would these suit your needs?


        gauge1.setMaxValue(800);
        gauge1.setMinValue(0);
        gauge1.setTotalNicks(100);
        gauge1.setValuePerNick(10);
        gauge1.setMajorNickInterval(10);
marloncarvalho commented 6 years ago

Hi @Pygmalion69! Yes, it's exactly what I need. I'm using this widget to show water tanks levels and each tank has a different capacity. That's why I need to set it programmatically. Will you publish it on Maven?

Pygmalion69 commented 6 years ago

Good. It's in the latest release (1.3.1) on JitPack.