I want the SeekBar
progress to change whenever I click a button. Using setProgress()
works only for initial value. It throws an error if I use it
Try this :
seekBar.setMax(50);
seekBar.setProgress(22);
instead of :
seekBar.setProgress(22);
seekBar.setMax(50);
Only if you set the Max Value first, can the SeekBar get an idea of how much progress is actually made, when you set the progressValue.
This actually made a difference for me when I wanted a default value for my Progress Bar