• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Two Thumb Range Seekbar Progress Intervals Issue

radz

Lurker
Sep 23, 2014
1
0
Hai i created a two thumb range seek bar using given code.its working fine.now i want to change the custom values for the slider in seekbar like, start value 1000 to 10000 i want to increment by 100 and from 10000 to 100000 i want increment by 500..how can i do that..

int startValue =1000;
int endValue =100000;
finalint factor =500;
RangeSeekBar<Integer> seekBar =newRangeSeekBar<Integer>(startValue/factor,
endValue/factor,this);
seekBar.setOnRangeSeekBarChangeListener(newRangeSeekBar.OnRangeSeekBarChangeListener<Integer>(){

@override

publicvoid onRangeSeekBarValuesChanged(RangeSeekBar<?> bar,Integer minValue,Integer maxValue){
minValue = minValue*factor
maxValue *= factor;
value.setText(minValue +" : "+ maxValue);

}});
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones