Hey guys I'm trying to make a brightness bar in android and I want to set the position of the thumb
to minimum like for example minimum value is 20, then the thumb
should not get dragged before 20, that means 20 should be minimum, is this possible? I tried seekbar.setMax(20);
but it's not what I want. Any help would be gladly appreciated! Thanks in advance!
Asked
Active
Viewed 589 times
0

Ajinkya More
- 425
- 1
- 3
- 15
-
possible duplicate of [How to set seekbar min and max value](http://stackoverflow.com/questions/20762001/how-to-set-seekbar-min-and-max-value) – Nikola May 16 '15 at 10:26
1 Answers
1
seekbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
int MIN = 5;
if (progress < MIN) {
value.setText(" Time Interval (" + seektime + " sec)");
} else {
seektime = progress;
}
value.setText(" Time Interval (" + seektime + " sec)");
}
});

AmDroid
- 131
- 5