I have same problem again.
my customlistview taking more than 4 min for nearly 1200 records of sqlite
7.12.00 7.16.00
my code is :
whats wrong?
my customlistview taking more than 4 min for nearly 1200 records of sqlite
7.12.00 7.16.00
my code is :
B4X:
cursor = Starter.year.ExecQuery("select * from GL where FBOOK='G001' order by FDESC")
Dim maccode,desc,place,accode,open,open_type,tot_dr,tot_cr,close,close_type As String
Do While cursor.NextRow
maccode = cursor.GetString("FACCODE")
desc = cursor.GetString("FDESC")
place = cursor.GetString("FPLACE")
accode = cursor.GetString("FACCODE")
'open = Round2(cursor.GetString("FAMT"),2)
open = cursor.GetString("FAMT")
open_type = f1.opening_balance_type(Starter.year,maccode,Starter.ch_date2)
Log(open)
tot_dr = Round2(f1.tot_dr(Starter.year,maccode,Starter.ch_date1,Starter.ch_date2),2)
tot_cr = Round2(f1.tot_cr(Starter.year,maccode,Starter.ch_date1,Starter.ch_date2),2)
close = Round2(f1.balance_as_on(Starter.year,maccode,Starter.ch_date2),2)
close_type = f1.opening_balance_type(Starter.year,maccode,Starter.ch_date2)
Log(desc)
CustomListView1.Add(Add_row(desc,place,accode,open,open_type, _
tot_dr,tot_cr,close,close_type),accode)
Loop
Sub Add_row(desc As String,place As String,accode As String, _
open As String,open_type As String,tot_dr As String, _
tot_cr As String,close As String,close_type As String) As B4XView
Dim xui As XUI
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0,0,0,60%x,35%x)
p.LoadLayout("m4741_listview")
Label1 .Text = desc
Label2 .Text = place
Label3 .Text = accode
Label8 .Text = open
Label9 .Text = tot_dr
Label10.Text = tot_cr
Label11.Text = close
Label12.Text = open_type
Label13.Text = close_type
Return p
End Sub
Last edited: