Android Question How to show a list always from the beginning

clooney48

Active Member
Licensed User
Longtime User
Hello!

Ich have a code to sort all my items by different criterias. This works fine.
The point is now that when I scroll to the middle of the list, for example, and sort the list by another criteria, this works without problems but the list is shown also from the middle, not from the beginning.

How can I show the list always from the beginning?

B4X:
If L = "R" Then cursor1 = SQL1.ExecQuery("SELECT * FROM tblPO WHERE Dist <= " & km & " ORDER BY ID")
If L = "N" Then cursor1 = SQL1.ExecQuery("SELECT * FROM tblPO WHERE Dist <= " & km & " ORDER BY UPPER(Name)")
For i = 0 To cursor1.RowCount - 1
     cursor1.Position = i
     LVDb.AddTwoLines(n & ") " & sName, Dist1 & " " & DBSettings.sEinh)
Next
 
Top