Hello all, i came across a very confusing issue and was wondering if maybe there's something i've missed during the last 3 o or 4 updates of B4A.
So, I have one activity and i have 2 different panels, the first panel starts at the top of the activity and the height is around 45% of the total height of the activity, the tablet i'am using has a resolution of 800x1280, the second panel starts at the bottom of the first panel and its height is also around 45% of the activity's total height.
I want each panel to load a different layout, the layouts i have created them using the designer. Each layout only contains around 10 to 11 labels and edittext boxes.
The issue i'm seeing is that both panels were loading each of the layouts just fine, and suddenly i noticed that the first panel doesn't load its layout anymore, however the second panel load its layout just fine.
My question is this: is it not possible to have more than one panel in one activity and have each panel load different layouts at the same time?
This is giving me a headache

I don't see why this wouldn't be possible!
Here's what i've tried so far:
I copied all the views on the first layout and created a whole new layout and pasted those views onto the new layout, the first time i run the project i saw the first layout loaded just fine, the second time the same problem, the layout did not show up, so basically i see a big empty white space starting from the top down to about 45%y. and the panel with the second layout shows just fine below where the first panel with the first layout should show up.
I then deleted the parent panel and placed all the views on the layout without any parent panel.
I have a panel on the top as a header and inside the panel i have a label, I run the project and it loads the layout fine with all the labels and the edittext boxes but the header panel with the label inside of it, does not show up.
WTH.
I've put together a sketch of what i'm trying to do, as you can see there are two different panels where each panel should load a different layout.
and here's also the code.
I totally feel like a newbie, i can't see why this is happening.
Some help please?
EDITED:
Added a small project to show the problem.
Thanks,
Walter
So, I have one activity and i have 2 different panels, the first panel starts at the top of the activity and the height is around 45% of the total height of the activity, the tablet i'am using has a resolution of 800x1280, the second panel starts at the bottom of the first panel and its height is also around 45% of the activity's total height.
I want each panel to load a different layout, the layouts i have created them using the designer. Each layout only contains around 10 to 11 labels and edittext boxes.
The issue i'm seeing is that both panels were loading each of the layouts just fine, and suddenly i noticed that the first panel doesn't load its layout anymore, however the second panel load its layout just fine.
My question is this: is it not possible to have more than one panel in one activity and have each panel load different layouts at the same time?
This is giving me a headache
I don't see why this wouldn't be possible!
Here's what i've tried so far:
I copied all the views on the first layout and created a whole new layout and pasted those views onto the new layout, the first time i run the project i saw the first layout loaded just fine, the second time the same problem, the layout did not show up, so basically i see a big empty white space starting from the top down to about 45%y. and the panel with the second layout shows just fine below where the first panel with the first layout should show up.
I then deleted the parent panel and placed all the views on the layout without any parent panel.
I have a panel on the top as a header and inside the panel i have a label, I run the project and it loads the layout fine with all the labels and the edittext boxes but the header panel with the label inside of it, does not show up.
WTH.
I've put together a sketch of what i'm trying to do, as you can see there are two different panels where each panel should load a different layout.
and here's also the code.
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")
sv.Initialize(10000)
Activity.AddView(sv, 0, 0, 100%x, 100%y)
parentpanel.Initialize("parent")
parentpanel2.Initialize("parent2")
parentpanel.LoadLayout("gnrldetails")
parentpanel2.LoadLayout("hdrportcalls")
sv.Panel.AddView(parentpanel, 0, 0, 100%x, 80%y)
sv.Panel.AddView(parentpanel2, 0, (parentpanel.Top + parentpanel.Height) - pnlsection.Height, 100%x, 30%y)
End Sub
I totally feel like a newbie, i can't see why this is happening.
Some help please?
EDITED:
Added a small project to show the problem.
Thanks,
Walter
Attachments
Last edited: