How to finish an Activity that is used in a TabSpec, as the child of TabHost
Asked Answered
R

1

6

I have Main Activity which contains a TabHost. In the TabHost I have several TabSpec which use an Intent for the content of the tab.

At certain points in my code I need to remove a tab from the TabHost, and finish the Activity that was in that tab's TabSpec.

I am able to remove the tab from the TabHost, but as soon as I call finish on that child Activity, the Main Activity terminates. I have even tried calling finish some time later, with a timer. It still kills the main activity.

How can I finish a child activity without killing the main activity?

Redundant answered 10/9, 2012 at 19:52 Comment(1)
Why don't you turn the tab into a Fragment instead of an Activity?Thrasher
A
0

Tab Host was decrapated by google so you shouldnt use it anymore you should replace it using actionbarsherlock its a better option for tabs.

Auspice answered 27/5, 2013 at 12:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.