The range of my seekbar is between (-100,100) and the thumb starts on 0 (in the middle of the seekbar). I want to the progress tint starts at middle. With this library, the progress tint starts always in the beginning of the seekbar.
I used this library, with the ticks. https://github.com/warkiz/IndicatorSeekBar
My xml.
And my kotlin code:
mBinding.seekbarWorkout.customSectionTrackColor { colorIntArr ->
for (i in 0..9) {
colorIntArr[i] = resources.getColor(R.color.white_transparent, null)
}
true //true if apply color , otherwise no change
}
mBinding.seekbarWorkout.onSeekChangeListener = object : OnSeekChangeListener {
override fun onSeeking(seekParams: SeekParams?) {}
override fun onStartTrackingTouch(seekBar: IndicatorSeekBar?) {}
override fun onStopTrackingTouch(seekBar: IndicatorSeekBar?) {
updateViewModel()
}
}
The track progress color must starts in the middle of the seekbar. I want something like this:



Tried in demo and working fine.
For me this code worked fine if its still not working then rather then implementing library and copy that IndicatorSeekBar class to understand it better.