-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Progress step(increment) value #30
Comments
You can do it this way on the onProgressChanged method:
|
Hi @hamz250 , Your implementation is exactly like mine. I don't see any improvement (your post looks better because you used the "insert code" function correctly). My question was if there is any way to set the step (the workaround how to apply a function to get it, found it pretty fast). I was looking for a method like "mCircularSeekBar.setStep(step)", like "mCircularSeekBar.setProgress(progress)". Anyways, thanks for the answer, |
Hello,
Is there any way to set the step value ? I mean if I have values from 0-200 and the step of 25, on stop trackingtouch to get only values multiple of 25 (0, 25, 50, 75...). This is how I temporally implemented on my app :
`circularSeekBar.setOnSeekBarChangeListener(new CircularSeekBar.OnCircularSeekBarChangeListener() {
@OverRide
public void onProgressChanged(CircularSeekBar circularSeekBar, int progress, boolean fromUser) {
selectedAmount = (progress / 25) * 25;
amount.setText(String.valueOf(selectedAmount));
}
`
Selected amount is an int where I keep the current progress of the seekbar and amount is a textview where I show it. With this implementation I get the values smaller or equal ... so if it's a value inside 25-49 I return 25. It's not the best solution, but it works...
Thanks !
The text was updated successfully, but these errors were encountered: