I want to add a view to a layout by code, how do I do that?
Activity.AddView(view, 0, 0, 100%x, 100%y)
just adds it to whatever there is on the screen, but I want to add it to a layout (which is then opened in a Tab of a TabHost).
For each Tab layout, defined in the Designer, you should first add a panel and then add all the views onto thie panels.
Then you load the layouts onto the Tabs.
You can then add views by code to these panels with:
Panel1.AddView(view, x, y, w, h)