setCurrentItem

fun setCurrentItem(position: Int, smoothScroll: Boolean = true)

Sets currently selected item.

Parameters

position

position of item to select and scroll to.

smoothScroll

true to scroll and move item indicator with an animation, false otherwise.