When i rotate my device the layout vanishes. The only way i can retain it is if i have this in the Activity_Resume sub
Surely this is not right?
This is the Create Sub
Can anyone advise as to what is going wrong?
B4X:
Sub Activity_Resume
Activity.LoadLayout("Menu")
End Sub
Surely this is not right?
This is the Create Sub
B4X:
Sub Activity_Create(FirstTime As Boolean)
If FirstTime=True Then
Activity.LoadLayout("Menu")
SQL.Initialize(File.DirDefaultExternal, "WDOrders.db", True)
Activity.LoadLayout("Table")
WebView1.Width = 100%x - WebView1.Left
WebView1.Height = 90%y - WebView1.Top
Image1.Initialize("Image1")
Image1.Visible = False
Activity.AddView(Image1, 10dip, 10dip, 100%x - 20dip, 100%y - 20dip)
WebView1.Visible=False
End If
End Sub
Can anyone advise as to what is going wrong?