Hi guys,
I always create layout of my Android apps by using code only. I'm trying to do the same with B4i.
Here is the routine I'm using:
Is there something wrong? I make test app with 2 pages. I load background by adding an ImageView. It's ok on Page1 but when I move to Page2 and back to Page1 there's no more background. Please find attachment for the code.
Hope you can share your experience. I'm very new to iOS and B4i.
Thank you so much.
I always create layout of my Android apps by using code only. I'm trying to do the same with B4i.
Here is the routine I'm using:
B4X:
Private Sub Application_Start
Initialize pages (Page1, Page2...)
Call Sub that create Page1 Layout
Show Page1
End Sub
Private Sub CreatePage1Layout
Initialize views of Page1
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
Add all views of Page1 into Page1.RootPanel here
End Sub
Private Sub ButtonToOpenPage2_Click
Call Sub that create Page2 Layout
Show Page2
End Sub
Private Sub CreatePage2Layout
Initialize views of Page2
End Sub
Private Sub Page2_Resize(Width As Int, Height As Int)
Add all views of Page2 into Page2.RootPanel here
End Sub
.......
Is there something wrong? I make test app with 2 pages. I load background by adding an ImageView. It's ok on Page1 but when I move to Page2 and back to Page1 there's no more background. Please find attachment for the code.
Hope you can share your experience. I'm very new to iOS and B4i.
Thank you so much.