Hi,
I have this code:
I'm using an emulator, with Android 2.2 in it.
I start with the phone in portrait mode. Changing the orientation to landscape (ctrl+f11) runs the above code ONCE, logging this:
I now clear the log window to make sure I don't copy any old logs.
Then I change back to portrait mode (ctrl+f11 again), and the above code runs TWICE:
These are all NEW logs, not the previous log!
Changing to landscape runs the code once, back to portrait, and it runs it twice again.
I'm confused. What am I doing wrong? :-o
Thanks,
Ati
I have this code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("menu")
Dim w As Int = Activity.width
Dim h As Int = Activity.height
Log ("Width: " & w & ", Height: " & h)
If (w > h) Then
Log ("Width > Height")
End If
End Sub
I'm using an emulator, with Android 2.2 in it.
I start with the phone in portrait mode. Changing the orientation to landscape (ctrl+f11) runs the above code ONCE, logging this:
B4X:
** Activity (menu) Pause, UserClosed = false **
** Activity (menu) Create, isFirst = false **
(Menu, 25) FullScreen or IncludeTitle properties in layout file do not match the activity attributes settings. (warning #1004)
Width: 480, Height: 295
Width > Height
** Activity (menu) Resume **
I now clear the log window to make sure I don't copy any old logs.
Then I change back to portrait mode (ctrl+f11 again), and the above code runs TWICE:
B4X:
** Activity (menu) Pause, UserClosed = false **
** Activity (menu) Create, isFirst = false **
(Menu, 25) FullScreen or IncludeTitle properties in layout file do not match the activity attributes settings. (warning #1004)
Width: 480, Height: 295
Width > Height
** Activity (menu) Resume **
** Activity (menu) Pause, UserClosed = false **
** Activity (menu) Create, isFirst = false **
(Menu, 25) FullScreen or IncludeTitle properties in layout file do not match the activity attributes settings. (warning #1004)
Width: 320, Height: 455
** Activity (menu) Resume **
These are all NEW logs, not the previous log!
Changing to landscape runs the code once, back to portrait, and it runs it twice again.
I'm confused. What am I doing wrong? :-o
Thanks,
Ati