Switch back to previously selected tab after the activity is recreated

Posted by ZelluX on Stack Overflow See other posts from Stack Overflow or by ZelluX
Published on 2010-06-13T11:48:17Z Indexed on 2010/06/13 11:52 UTC
Read the original article Hit count: 211

Filed under:
|

In my TabActivity the user may be asked to switch to browser activity for OAuth phase, and if the phase takes too much time, my activity will be killed. After the user switches back to my activity, its onCreate() method is invoked again and tabs are recreated.

So I would like to know if there is any simple way to switch back to previous tab, and keep the tab as what it was. For example, one of the tab views contains a ViewSwitcher child, and I want to switch back to the switched view after recreating the activity.

© Stack Overflow or respective owner

Related posts about android

Related posts about tabhost