Bug? xCustomListView JumpToItem


Well-Known Member
Licensed User
Longtime User
I've got an issue with xCustomListView.JumpToItem and I'm not sure if this is a bug, a feature or a system limitation :)

JumpToItem is supposed to jump to a specified item without animating the scroll, but it doesn't always work.

The problem is that when this command is executed WHILE the listview is still animating (due to a finger swiping down), nothing happens.

Create a layout file with an xcustomlistview and a button, run this code, and swipe with your finger over the screen really quick over the listview from bottom to top to start the animation. You will see the list scrolling from 1 to 100, which is normal. WHILE the animation is still running, quickly press the button. Nothing will happen. You'll think the list has ended up on position 1 but in reality that is not the case. (BTW, in B4A ScrollToItem(1) seems to work fine, even during the animation, but as far as I can see not in IOS).

Sub Process_Globals
    Private xui As XUI
End Sub

Sub Globals
    Private CustomListView1 As CustomListView
    Private Button1 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    For i = 1 To 100
        CustomListView1.AddTextItem("Test " & i, Null)
End Sub

Sub Button1_Click
    CustomListView1.JumpToItem(1) ' doesn't work when the animation is running
End Sub