'Smoothly scrolls the list to the specified item.
Public Sub ScrollToItem(Index As Int)
Dim offset As Float = Min(GetMaxScrollOffset, FindItemOffset(Index)) 'ignore
#if B4i
Dim nsv As ScrollView = sv
If horizontal Then
nsv.ScrollTo(offset, 0, True)
Else
nsv.ScrollTo(0, offset, True)
End If
#else if B4J
JumpToItem(Index)
#Else If B4A
If horizontal Then
Dim hv As HorizontalScrollView = sv
hv.ScrollPosition = offset 'smooth scroll
Else
Dim nsv As ScrollView = sv
nsv.ScrollPosition = offset
End If
#End If
End Sub