Search code examples
androidkotlinrangeslider

Android Kotlin Range slider setting values programmatically


I've added a RangeSlider to android Kotlin app and I'm trying to set the values read from settings. Settings are fine but when I set those to slider eg. slider.values[0] = 12.0F the value doesn't change. With normal slider it's ok. Am I missing something?


Solution

  • Use it by calling setValues(x,y) with two values to enable two thumbs.