Monday, September 10, 2012

[android-developers] How to finish an Activity that is used in a TabSpec, as the child of TabHost

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?


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment