Note that there are some explanatory texts on larger screens.

plurals
  1. POMove back to previous Activity from another Activity, don't know where Activity is in stack
    primarykey
    data
    text
    <p>I have a <code>TabActivity</code> that is the "base" <code>Activity</code> in my application. From the <code>TabActivity</code> a user can navigate through new Activities that are not a part of the original TabHost (I'm not messing around with TabGroups or anything like that).</p> <p>My application also has a global options menu, from which a user should be able to navigate back to the original <code>TabActivity</code> and select a certain tab. For example, if the user selected the left-most options menu item, they would go to the left-most tab in the original <code>TabActivity</code>.</p> <p>How can I accomplish this behavior? I do <em>not</em> want to start a new <code>TabActivity</code> because the original <code>TabActivity</code> has data propogated on it like Map points and a ListView. Ideally I would like to go back to that specific <code>TabActivity</code>. This movement can also occur at any point in the lifecycle, e.g.:</p> <p>Original <code>TabActivity</code> -> Activity1 -> Activity2 -> Activity3 -> Activity <em>n</em> ->Back to Original <code>TabActivity</code></p> <p>Original <code>TabActivity</code> -> Activity1 -> Back to Original <code>TabActivity</code></p> <p>There can be any number of Activities launched in between the navigation. Therefore, calling <code>finish()</code> in the current Activity won't satisfy this (as far as I know...).</p> <p>My questions/concerns:</p> <ol> <li>Primarily, how to accomplish this.</li> <li>It <em>is</em> possible that the original <code>TabActivity</code> could be removed from the stack due to memory, correct? If so, how to deal with that? I assume if I figured out a way to locate the original <code>TabActivity</code> I could just do a check for null and if it's not there, start a new <code>TabActivity</code>.</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload