I have a TabHost with one tab and a panel for the content. When I try to log the Panel.Left it gives me a ClassCastException error. I'm trying to dynamically create and add controls to the panel and keep them aligned properly.
B4X:
Dim p As Panel
p.Initialize("")
thAddCustomer.AddTab2("test",p)
Log(p.Left)
The panel layout is a special type of layout that makes it stretch to fill the tab page.
You should use TabHost.AddTab and add a layout file instead of a panel. In the designer script of this layout file you can do whatever you like to correctly resize the layout.
You have a layout which can be used like any other layout used with LoadLayout.
So you even can dynamically load a other layout to the tab if you want.
Or put any view on the panel in this layout. whatever.