开发者

pause/resume activity started from another activity in android

开发者 https://www.devze.com 2023-02-24 16:54 出处:网络
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?

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

精彩评论

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

关注公众号