views:

176

answers:

1

My SeekBar (slider) works just fine but, it increments/decrements by one's as I slide my finger but, I want to change the increment value to a constant, such as 5. I tried using

slider.incrementProgressBy(5);

to do it but, it doesn't work (note: I placed it in different locations, inside and outside the action listener, but it didn't work).

Here are the two lines that relate to this:

slider.incrementProgressBy(5);
validBpm = slider.getProgress();

Those lines are currently inside the SeekBar's touch listener.

I imagine it's simple and I'm overlooking the obvious - any suggestions? Thanks...

+1  A: 

AFAIK, you cannot change the SeekBar increment value. Instead, change your max (setMax()) and use multiplication. For example, rather than 0 to 25 incrementing by 5, use 0 to 5 incrementing by one, then multiply the SeekBar value by 5 to get your result.

CommonsWare
Perfect - it works. Thank you for good, quick answer!(I don't have enough points to rate your answer)
headscratch