Android Question (solved) invest listview

f0raster0

Well-Known Member
Licensed User
Longtime User
Hi all,
How can I invest the listview list?

B4X:
'show ListView1
    Dim Cursor1 As Cursor
      Dim string1, string2 As String

        Cursor1 = SQL1.ExecQuery("SELECT ID, email, total FROM QR")
            For i = 0 To Cursor1.RowCount - 1
                Cursor1.Position = i
                T_Index = Cursor1.GetInt("ID")
                string1 = Cursor1.GetString("total")
                string2 = Cursor1.GetString("email")             
                ListView1.AddSingleLine2( string1 & " -- " & string2 & " -- ", T_Index)      
             
            Next
        Cursor1.Close

I add information as below:

B4X:
Sub AddNew
   SQL1.ExecNonQuery2("INSERT INTO QR VALUES(Null, ?, ?)", Array As Object( 1, Label1.Text))
End Sub

Thanks

EDIT: I add information in a DB SQLite and show it in listview1
The information is in order: first to last information added..
I will like to invest the order in listview: show last information to first information added
 
Last edited:

f0raster0

Well-Known Member
Licensed User
Longtime User
Currently the liestview show me:
ID email total
1 email1 5
2 email2 5
3 email3 4

I'll like to show the last information added in first position like:
ID email total
3 email3 4
2 email2 5
1 email1 5
 
Upvote 0
Top