Hi guys,
I wrote the following code to display DB content into labels ( L ) added in one svrollview ( SV )
this example code can only display 300 labels ( limit at 300 in the code )
my question is : how many labels could I display in a scrollview reading from a DB ? if the records of my db were 3000, would be possible to display them in the Scrollview having no memory error/overflow ?
Thanks for your support
I wrote the following code to display DB content into labels ( L ) added in one svrollview ( SV )
B4X:
Dim sql1 As SQL
Dim in As Cursor
dim L(300) as label
sql1.Initialize(File.DirDefaultExternal,nomedb,False)
in=sql1.ExecQuery("SELECT * FROM MYTAB")
SV.ScrollPosition=0
SV.Panel.Height=in.RowCount*25DIP
For i=0 To in.RowCount-1
in.Position=i
L(i+1).Initialize("cella")
L(i+1).Text=in.GetString("VALUE")
L(i+1).Gravity=Gravity.CENTER
SV.Panel.AddView(L(i+1),0dip,25DIP*i,300DIP, 25DIP)
Next
in.Close
sql1.Close
this example code can only display 300 labels ( limit at 300 in the code )
my question is : how many labels could I display in a scrollview reading from a DB ? if the records of my db were 3000, would be possible to display them in the Scrollview having no memory error/overflow ?
Thanks for your support