tabhost example neede

klaus

Expert
Licensed User
Longtime User
I played a bit with the TabHost View and found that when using a second layout file for a Tab the Activity's background color is not shown. It shows only the black default color, the other View's colors are OK.
Must the 2nd Activity be loaded, declared or initialized somewhere?

I use 2 panels, the Visible property for the one that is not displayed at the beginning must be set to False.
Couldn't this be 'automatic' ?

Will the 'setCurrentTab' and or 'setCurrentTabByTag' methods be supported.

Best regards.
 

Attachments

  • TestTabHost.zip
    7.1 KB · Views: 326

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can use CurrentTab to change the current tab. Basic4android - Views (Core)

The background issue will be fixed.

I use 2 panels, the Visible property for the one that is not displayed at the beginning must be set to False.
Couldn't this be 'automatic' ?
Not sure that I understand the question, but you can set the Visible property with the designer.
 

klaus

Expert
Licensed User
Longtime User
To see what I mean you should comment out
' pnlSetup.Visible=False
' pnlPage1.Visible=True
End Sub
in the Activity_Create routine in the program I posted in my previous post.
Then when running it and click on Page 2 you will see the panel with the ListView View (Page 3) and not the 2nd activity.
Clicking on Page 3 nothing changes.
Clicking on Page 2 again shows now the 2nd activity.

With Couldn't this be 'automatic' ? I meant that B4A should set the not used Panel's Visible properties to False automatically.

Best regards.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Top