开发者

Update last activity based on the changes in the current activity in android?

开发者 https://www.devze.com 2023-02-20 15:30 出处:网络
I have two activities A and B. I am currently in Activity A and from A I an starting activity B. Now After finish the work on B, based on the changes in the activity B I want to up开发者_运维知识库dat

I have two activities A and B. I am currently in Activity A and from A I an starting activity B. Now After finish the work on B, based on the changes in the activity B I want to up开发者_运维知识库date the Activity A.


It sounds like startActivityForResult() is what you're looking for.

Example - Activity A starts Activity B with startActivityForResult(). When Activity B finishes it can return information back to Activity A via onActivityResult().

Google has a code example online: http://developer.android.com/reference/android/app/Activity.html#StartingActivities


Simply Override the onResume() Method of your first activity to accommodate new changes.

It will work for sure :)

0

精彩评论

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