Hi everyone, I'm brand new to B4A and I'm very excited about getting to grips with it creating my first app. Anyways, I'm trying to build an app that has a Tabhost (3 tabs) on the main activity. Got this done ok. Next I would like to progmatically add listviews to 2 of the the tabs. How do you specify which tab your adding to. The reason I want to do it in code is you seem to have more control over the views' properties this way. i.e. height and width can be %, etc. Designer only seems to allow 'real numbers'.
I would suggest you to either:
- create a layout file for each tab, and reposition the views in the code.
- add, in the code, a panel to each tab, and add the different views to these panesl with Panel.AddView
Just downloaded and looked at the 'helper'. Looked up tabhost and noticed it has a second variation that allows you to use panels instead of layouts. Think I will have a play with that method. Thanks for your suggestion.
I take it, if I add it with the designer, I can still re-size? The only saving with this method then I take it would be I wouldn't have to initialise the view?