I am currently working on a B4A project using UltimateListView and I am facing an issue with maintaining the scroll position after refreshing the list. Here's a brief description of my problem:
When I refresh the data in the list, the view resets and jumps to the last item. I have tried to use JumpTo(idx, false) where idx is the position I stored before the refresh using GetFirstVisiblePosition. However, it doesn't seem to work unless I use JumpTo(idx, true), which results in a poor visual effect.
Here's the code I am using to refresh the list:
When I refresh the data in the list, the view resets and jumps to the last item. I have tried to use JumpTo(idx, false) where idx is the position I stored before the refresh using GetFirstVisiblePosition. However, it doesn't seem to work unless I use JumpTo(idx, true), which results in a poor visual effect.
Here's the code I am using to refresh the list:
B4X:
qry = DBData.SQL1.ExecQuery(sqlCode)
ulvs.ClearContent
If qry.RowCount > 0 Then
ulvs.BulkAddItems(qry.RowCount, "ROW", 0)
Else
ToastMessageShow("No data...", True)
End If