Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Ajust Slider per any digit rounded #29

Open
thiinkbox opened this issue May 13, 2021 · 0 comments
Open

Ajust Slider per any digit rounded #29

thiinkbox opened this issue May 13, 2021 · 0 comments

Comments

@thiinkbox
Copy link

ENJOY!

slidr.setListener(new Slidr.Listener() {
                @Override
                public void valueChanged(Slidr slidr, float currentValue) {
               //TO ROUND DIGIT TO NEAREST 5
                  slidr.setCurrentValue( (float)Math.ceil(currentValue / 5d) * 5);
                }

            });
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant