Android SeekBar set progress value

后端 未结 6 977
旧时难觅i
旧时难觅i 2020-12-06 16:22

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

6条回答
  •  醉酒成梦
    2020-12-06 16:48

    As of support library 28.0.0 anyway, I can set the progress simply like this

    mySeekBar.setProgress(17);
    

    and the position gets updated without a problem.

提交回复
热议问题