Bug? Customlistview, scrolltoitem problem

kohle

Active Member
Licensed User
Longtime User
I have the customlistview 1.76 in serveral projects and no time to change this projects to xcust...

scrolltoitem and jumptoitem dont work.

For check, I downloaded the example from : https://www.b4x.com/android/forum/t...xible-list-based-on-scrollview.19567/#content

and I made the changes to the code :

B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    clv1.AddTextItem("Aaaa", "a")
    clv1.AddTextItem("Aaaa" & CRLF & "Bbbb", "b")
    clv1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc", "c")
    clv1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc" & CRLF & "Dddd" , "d")
    clv1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc" & CRLF & "Dddd" & CRLF & "Eeee", "e")
    For i = 1 To 30
        clv2.Add(CreateListItem($"Item #${i}"$, clv2.AsView.Width, 70dip), 70dip, $"Item #${i}"$)
    Next
  
  
    clv1.JumpToItem(3)
    clv2.Jumptoitem(12)
  
  
  
    clv1.ScrollToItem(3)
    clv2.ScrollToItem(12)
  
End Sub


It dont work. I have b4a 8

Edit : I checked sample of xcustom... Dont work too.
Edit : If I put a breakpoint it works. Without breakpoint no.
 
Last edited:

kohle

Active Member
Licensed User
Longtime User
it works, small list, , but maybe its better to include a "retrieveend event"
 
Top