I have the same problem, every time the screen is rotated (I only have 1 Page) the created event is fired, How I can get FirsTime = True when the app starts and False when it rotates?
Sub Process_Globals
Public FirstTime As Boolean
End Sub
Sub Service_Create
FirstTime = True
End Sub
or
Main:
Sub Process_Globals
Public FirstTimeMain As Boolean
End Sub
Sub Activity_Create(FirstTime As Boolean)
FirstTimeMain = FirstTime
Dim pm As B4XPagesManager
pm.Initialize(Activity)
End Sub
Then:
B4XMainPage:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
'...code
If Starter.FirstTime Then 'or If Main.FirstTimeMain Then
'code FirstTime
Else
'code No FirstTime
End If
End Sub