Well, I'm stumped... I have a layout containing a bunch of Labels, EditTexts, a Panel for showing a camera preview & the photo taken, & 3 buttons. In my Activity_Create, if I create & initialize a ScrollView & then load the layout into the ScrollView.Panel, everything works fine. Here is the code:
The attached image - Works (Small).png - shows the result.
However, if I load another layout that contains a TabHost, then create & initialize the ScrollView & then add the first layout to the ScrollView, then create a tab containing the ScrollView, things don't go so well. I end up with most of the layout, however the panel for the photo displays a bunch of colored lined (instead of the photo) & one of the 3 buttons is missing. Here is the code:
The attached image - Fails.png - shows the result.
I've tried all kinds of different orders of the code, tried creating the TabHost in code (instead of loading it from a layout) & I don't know how many other connotations, but I cannot get it to display the photo Panel properly or show the 3rd button. Any ideas?
Thanks - Colin.
B4X:
Sub Activity_Create(FirstTime As Boolean)
vScroll.Initialize(100dip)
Activity.AddView(vScroll, 0, 0, 100%x, 100%y)
vScroll.Panel.LoadLayout("details")
vScroll.Panel.Height = pnlDetails.Height
End Sub
The attached image - Works (Small).png - shows the result.
However, if I load another layout that contains a TabHost, then create & initialize the ScrollView & then add the first layout to the ScrollView, then create a tab containing the ScrollView, things don't go so well. I end up with most of the layout, however the panel for the photo displays a bunch of colored lined (instead of the photo) & one of the 3 buttons is missing. Here is the code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("th")
vScroll.Initialize(100dip)
tabDetails.AddTab2("Pet Details", vScroll)
vScroll.Panel.LoadLayout("details")
vScroll.Panel.Height = pnlDetails.Height
End Sub
The attached image - Fails.png - shows the result.
I've tried all kinds of different orders of the code, tried creating the TabHost in code (instead of loading it from a layout) & I don't know how many other connotations, but I cannot get it to display the photo Panel properly or show the 3rd button. Any ideas?
Thanks - Colin.