I need to recover an instance of an activity

Posted by Bilthon on Stack Overflow See other posts from Stack Overflow or by Bilthon
Published on 2010-05-09T20:57:09Z Indexed on 2010/05/09 21:08 UTC
Read the original article Hit count: 227

Filed under:
|
|
|

Well.. the title is pretty descriptive, I have a bunch of tab activities (which I implemented myself, didn't want to use the tabviews with activities inside them), so It's basically 5 activities calling each other every time the user clicks on the tabs displayed as a row of LinearLayouts at the bottom of the screen.

The thing is that the way I do it now, everytime the user jumps from one activity to another, a new activity is created and launched. Of course, I can see I'm wasting resources this way. So what I would like to do is to create every activity only once; and then if the user wants to go back to the previous (or any one that was already created and is probably paused) just check on some kind of list or array to see if the activity can be recovered and only in the case it can't; to lauch a new one.

My question is, how can I check this? should I save the intents? and how to recover the activities afterwards? I'm kind of new with java.

Greetings Nelson R. Perez

© Stack Overflow or respective owner

Related posts about android

Related posts about activity