Handling TabWidget Activity - Does it create a new activity EVERY time?

When TabWidget uses intents to assign a target Activity to each tab, is there any special handling for these activities in the activity stack outside of the default activity?

For an instance, if my application has tabs A, B and C and I click them in that order - A, B, A, C, A, B - how will the activity stack change?

My understanding of the default activity, if startActivity () is called every time on intent, will have a Stack that will load new instances of the activity: A, AB, ABA, ABAC, ABACA, ABACAB

It's hard to believe it works though ... It looks like it will be a waste of resources and could be endless. Can anyone tell me how this would work?

+2


a source to share


2 answers


For an instance, if my application has tabs A, B, and C and I click on them in this order - A, B, A, C, A, B - how would the Activity stack change?

Internal actions TabWidget

do not go on the stack.



My default understanding is if startActivity () is each time calling for the intent, have stacks to load new activity examples: A, AB, ABA, ABAC, ABACA, ABACAB

TabWidget

does not create new actions for every tab click.

+6


a source


Tabwidget is responsible for managing actions. All activities that are not displayed are paused and resumed the moment the activity is displayed in Tabhost.



+3


a source







All Articles