apptik / MultiSlider

Multi functional slider/seekbar( / rangebar / scrubber) for Android
Apache License 2.0
320 stars 80 forks source link

Get the values using index of slider thumbs. #70

Closed nbaua closed 7 years ago

nbaua commented 7 years ago

Hi,

I just started using your control for one of my project and seriously loved it so much. Only thing I would love to have on this control is getting the values using the thumb index.

For example:

Right now the code could look as under for ranges:

if (thumbIndex == 0) { doSmthForZero(String.valueOf(value)); } else if (thumbIndex == 1) { doSmthforOne(String.valueOf(value)); } else { doSmthElse(String.valueOf(value)); }

I would like to see something on the lines of getThumb(1).getValue() inside the change event, like getValueOf(thumbIndex);. OR on change provide a method which return string as -- getRangeValues()

May be I am asking too much, however the concern is it is really difficult for anyone to display range such as 18-25 in a single label while it changes.

I have a label which has a string bound as 'Age Range: {0}-{1}' while I want to change the values of {0} and {1} with the values of thumbs.

-- N Baua

nbaua commented 7 years ago

Okey, Just went through the code once again, and wish I would have looked deeply earlier.

I could use the oSlider.getThumb(1).getValue() method.

Thanks for making this awesome library.

-- N Baua