简体   繁体   中英

How to make Custom TabHost in android?

There is a problem please make it solve.

I am having 3 tabs in tab-host activity as we all knows on clicking those tabs we will switch to the respective activity say AB or C.

but,

every activity(A,B,C) has a button in which we are calling the another activity say A->B->C->A( ie A call the intent of B and B call the C activity an so on)

The switching of tab host is normal but when we are using the button click event from individual class the tab-host disappears.

Please solve this problem so that on tab host also appears on clicking the button .

Thanks!

Hey I was also suffering from that problem . After all tries I found that every activity must have tabs in it.

If you want similar tabs in another activity then make tabs on the another activities.

You can Extend TabsActivity instead of Activity because TabsActivity is super class of Activity so you can do all the things with TabsActivity also.

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