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)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.