Android Question Screen orientation problem, or not?

ssdzkrez

Member
Hello friends!

I'm learning B4A, and I have question ... maybe stupid one. I have a simple application:


B4X:
Sub Activity_Create (FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    Msgbox("FirstTime","")
End Sub

Sub Activity_Resume
    Msgbox("Resume","")
End Sub

When I change screen orientation in emulator or on real device, the application resets. Debug messages:

- application start ... ** Activity (main) Create, isFirst = true **
i click OK in msgbox ... ** Activity (main) Resume **
i have now Resume msgbox
- when I change screen orientation ... ** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
- I get msgbox "FirstTime". Why ... ifFirst = false?
 
Top