Issue
I've
Activity A -> Fragment A
[from Fragment A
I decide to create Activity B
]
Fragment A -> Activity B.
When I press back button, I go back to Fragment A
which contains data list. I'd like to update this list when back button is pressed. No, I don't store data locally and making another request is too expensive. Is there a simple way to pass modified object X on back button press [From Activity B to Fragment A]? How?
Solution
In fragment A you can call a method from Activity A to start an activity with result to Activity B.
When you go back you can send that data with it. In activity A you can have the method onActivityResult to catch this result and refresh Fragment A.
Answered By - Jikiwiki
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.