B4J Question Progress Indicator on Insert TableView

romario87027

Active Member
Licensed User
Longtime User
There is a progess indicator during the filling of a TableView?
Insert many records in a TableView, and hangs around until it has loaded.
I can do?
 

romario87027

Active Member
Licensed User
Longtime User
I already use a local database. I do not know if you could view the records as divided in 10 -10-10 ... and so on.
Then another thing that happens is that the TextField is not displayed in the TableView. You can seeonly after you resize the column.
see image...
 

Attachments

  • tableview.png
    tableview.png
    46.9 KB · Views: 232
Upvote 0

romario87027

Active Member
Licensed User
Longtime User
I have broken records every 15:
B4X:
  listarticoli =  parser.NextArray 'returns a list
       
        pagMax = listarticoli.Size / 15
        pagCorrente = 1
        lblPage.Text = pagCorrente & "/" & pagMax

forward 15

B4X:
Sub btAvanti_Action ()
If  pagCorrente < pagMax Then
  pagCorrente = pagCorrente + 1
 
  lblPage.Text = pagCorrente & "/" & pagMax
  AggiornaArticoli(listarticoli)

End If

back 15

B4X:
Sub btIndietro_Action ()
If  pagCorrente > 1 Then
  pagCorrente = pagCorrente - 1
 
  lblPage.Text = pagCorrente & "/" & pagMax
  AggiornaArticoli(listarticoli)
End If
End Sub
and visualize the current page
B4X:
 Dim i As Int
  i = (pagCorrente * 15 ) -15
  For i = i To i + 15
    If i<= RSean.Size Then
      M= RSean.Get(i)
    end if
next
showing 15 records has solved the problem of txtfield


Thanks Erel
 
Upvote 0

romario87027

Active Member
Licensed User
Longtime User
I would like to help Erel...What if I do not type like a list?
B4X:
Dim listarticoli As ResultSet
listarticoli = Main.SQL1.ExecQuery(" Select *  FROM Articoli  Where " & filtro )
prova(listarticoli)
This is not good
B4X:
sub prova(RSean As List)

Dim M As Map
Dim i As Int
  i = (pagCorrente * 15 ) -15
  For i = i To i + 15
    If i<= RSean.Size Then
      M= RSean.Get(i)
    end if
next
end sub

Can you suggest how can I do?
 
Upvote 0
Top