I have more than 20 items in xclv and want to scroll to the end of the list
I tested ScrollToItem and JumpTo but both function scroll clv to 18th item
Also, add sleep before this function but still have the same problem
I call the below function after add items to clv
What is the problem?
B4X:
Sub LoadMessages
lvmessages.Clear
messages = db_.GetGroupMessage(GroupID_)
For i = 0 To messages.Size - 1
Dim p As B4XView = xui.CreatePanel("")
p.Color = Colors.Transparent
p.SetLayoutAnimated(0, 0, 0, lvmessages.AsView.Width, 61dip)
lvmessages.Add(p, messages.Get(i))
Next
If lvmessages.Size > 0 Then
CallSubDelayed(Me,"Jump")
End If
End Sub
Sub Jump
Sleep(1500)
lvmessages.ScrollToItem(lvmessages.Size-1)
End Sub
I use only Jump without CallSubdelayed but not working
No not visble and I have to scroll to end manual
I added 20 items to clv and want to jump to end or clv.size-1 but clv jump to clv.size-4 or clv.size-3
'bug,Automatically move to the next line
clvShow.AddTextItem("darabon", "")
Sleep(0)
clvShow.ScrollToItem(clvShow.GetSize-1)
'clvShow.ScrollToItem(clvShow.Size-1) 'Automatically move to the next line
clvShow.RemoveAt(clvShow.GetSize-1)