Reputation: 15
Let's say I'm building an app that will navigate via tabs. So every tab would be a form or an Activity
.
How can I create a TabHost
in one activity and then for every tab have a different one so I don't mix up my code?
Upvotes: 1
Views: 6260
Reputation: 2405
I don't exactly what you mean by "mixing up code". But navigating using tabs is easy to implement. There is one main Activity which lists all the tabhosts, and then they are called as and when they are clicked. This is explained very well in this tutorial. http://www.mkyong.com/android/android-tablayout-example/
Hope this helps. Feel free to ask if there is any doubt.
Upvotes: 2