Android slider always returns to central point

Hi Everyone

Using Appium 1.2.2, I’m having trouble with a slider in our app. Its a completely stock Android element, and sets a value from 1-10, with a default value of 4. I’m attempting to set it to either the maximum or minimum value using driver.tap, and have used the webdriver location commands to establish the tap points, which works fine when making the tap, however on releasing the tap, the slider jumps from the correct point to the center point. This occurs when setting it to either the minimum or maximum value

Here’s my code, anyone got any ideas about why this is happening?

val topLeftLocation = slider.getLocation
val size = slider.getSize
val startOfSliderX = topLeftLocation.getX + 1
val startOfSliderY = topLeftLocation.getY
driver.tap(1, startOfSliderX, startOfSliderY, 500)

I’ve experimented with various different durations etc, but with no luck