I have an app that if I use B4XPages.AddPageAndCreate for each page it takes too long, I have tried to use Splash but the time is still high, I think the problem is that after loading the design I fill in the fields (the event is launched) and in each field I recalculate and there are many fields.
I have something like this:
I was planning to do the following to prevent filling in the fields (B4XComboBox, editText, etc.) from performing the calculations, is that correct? Are there better options?
I have something like this:
B4XMainPage:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
LoadLayOut
FillFields 'with KeyValueStore
Calculate1
Calculate2
'code
End Sub
I was planning to do the following to prevent filling in the fields (B4XComboBox, editText, etc.) from performing the calculations, is that correct? Are there better options?
B4X:
Sub Class_Globals
Private StartWithoutCalculating As Boolean
End Sub
B4XMainPage:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
StartWithoutCalculating = True
LoadLayOut
FillFields 'with KeyValueStore
StartWithoutCalculating = False
Calculate1
Calculate2
'code
End Sub
B4X:
Sub Calculate1
If StartWithoutCalculating Then Return
'code
End Sub
Sub Calculate2
If StartWithoutCalculating Then Return
'code
End Sub