开发者

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

开发者 https://www.devze.com 2023-04-08 05:35 出处:网络
I\'m trying to finish the Activity A since Activity B when it will finish too. The Activity B was launches since Actvity A.

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 开发者_C百科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

0

精彩评论

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

关注公众号