简体   繁体   中英

How to finish “Activity A” since “Activity B”? (Finish an Activity since other)

I'm trying to finish the Activity A since Activity B when it will finish too. The Activity B was launches since Actvity A.

So I've paused the Activity A. How can I do it?

You may try using startActivityForResult() on the Activity A to invoke the Activity B.

And then, before calling finish() on the Activity B, you should call setResult() and call finish() on the Activity A in onActivityResult()

Example here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM