开发者

pause/resume activity started from another activity in android

I have an activity say A from which I am starting an activity say B through startActivity(). How do I pause/resume activity开发者_JAVA百科 B from activity A?


How do I pause/resume activity B from activity A?

You can't, sorry. Most likely, no code from Activity A is even running while Activity B is on-screen.


It's a little difficult to determine what you're asking for. If you simply want to end Activity A and go back to Activity B, then you would call finish() to kill Activity A, or even just use the Back button to end it and go back...

onPause() and onResume are part of an Activity's life cycle. They are called by the Android framework and should never be called explicitly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜