I have a seekbar and trying to set the value from 60 to 180 for one and 40 to 190 for the second one in step of 1.
sb1 = (SeekBar) findViewById(R.id.progress
If you are using the AndroidX libraries (import androidx.preference.*), this functionality exists without any hacky workarounds!
import androidx.preference.*
val seekbar = findPreference("your_seekbar") as SeekBarPreference seekbar.min = 1 seekbar.max = 10 seekbar.seekBarIncrement = 1