B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim nr As Int :nr=0
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Panel1 As Panel
Dim ScrollView1 As ScrollView
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Activity .LoadLayout ("L1")
'panel1.Width =activity.Width
nr=nr+1
ToastMessageShow("Changes: " & nr,False)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Why? It seems easy, but I did not find the answer. :BangHead: