distanceToIndexSnap

open override fun distanceToIndexSnap(index: Int): Int(source)

Calculate the distance in pixels needed to scroll to the given index. The value returned signifies which direction to scroll in:

  • Positive values indicate to scroll towards the end.

  • Negative values indicate to scroll towards the start.

If a precise calculation can not be found, a realistic estimate is acceptable.