简体   繁体   中英

Android Tabs and different Activities

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM