I have a seekbar, while moving it I want to change values from 0 to 200. I have a TextView, where I display those values while moving the seekbar. But I don’t want to have every value from that interval(0,1,2,3,4,5…), but to have 10, 20, 30…so on. So when I move the seekbar, I want to display 10,20,30,40….to 200. Can somebody give me a hint or an example how to do this?
Share
Try below code
setProgress(int)is used to set starting value of the seek barsetMax(int)is used to set maximum value of seek barIf you want to set boundaries of the seekbar then you can check the progressbar value in the
onProgressChangedmethod. If the progress is less than or greater than the boundary then you can set the progress to the boundary you defined.