Update last activity based on the changes in the current activity in android?
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 :)
精彩评论