Klaus, the panel was added in the designer (I never do it by code). I have attached the zip file.
I'm afraid that you are mixing up a few things.
You defined the panel in the Designer in the Intersections layout file with the name
pnlbrgbrg, but you defined it again with the same name in the Embed module in the code and you load the Intersection layout onto it, but you didn't add the panel onto the Embed activity! The OS treats them as two different panels and unfortunately this doesn't work.
There are two possibilities:
- Define the
pnlbrgbrg panel with its views directly in the Embed layout file.
- Keep the Intersections layout file, but instead of adding the views onto a panel put them directly onto the layout activity. In the Embed modul code add the
pnlbrgbrg panel to the embed activity and load the new Intersection layout onto the panel.
Attached you find a modified version that works, with the second principle.
I modified the Intersection layout file.
Without the whole code it would have been impossible to help you
, that's the reason why I always ask for the code.
From my experience for having several panels in an activity, I suggest the following:
- Define a seperate layout file for each panel.
- Add the panels in the code
- Load the respective layout files onto the panels.
I had used panels defined with their views directly in the activity, but it's difficult to have a good overview of them so I abandoned doing it that way.
Best regards.