Android Question Tabhost tab changed

MotoMusher

Active Member
Licensed User
Longtime User
What event is fired when a tab is selected in tabhost?

I have several tabs, all working fine. I have a tab I am adding that I want to immediately launch an activity, which is a camera, rather than have the user click into the view.
 

NJDude

Expert
Licensed User
Longtime User
You could check the "CurrentTab" in the "TabHost1_TabChanged" event

e.g.
B4X:
Sub TabHost1_TabChanged
 
    If TabHost1.CurrentTab = <TAB_NUMBER> Then
 
       ... your code
 
    End If
 
End Sub
 
Last edited:
Upvote 0
Top