If you are using the AndroidX libraries (import androidx.preference.*
), this functionality exists without any hacky workarounds!
val seekbar = findPreference("your_seekbar") as SeekBarPreference
seekbar.min = 1
seekbar.max = 10
seekbar.seekBarIncrement = 1