开发者

the activity life cycle of the android tabhost

I am trying to use a tabhost that contains 3 tabs

I also have a button within the tabhost that can be clicked no matter what activity is 开发者_StackOverflow社区in the frameLayout. (this button returns back to a previous non tab activity)

When one of my tab activites is paused it stores some information.(So every time i switch tab information is stored).

what i am having trouble with is, when i press the button , i call

TabbedActivity.this.finish();

the onPause and onStop method of the activity within the frame layout is not called.

how would i go about calling these methods before i call the .finish() method


To ensure my onPause method was called.... i just called

if(tabHost.getCurrentTab() !=0){
                tabHost.setCurrentTab(0);
            }else{
                tabHost.setCurrentTab(1);
            }


            PinMeTabbedActivity.this.finish();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜