Reputation: 436
I have an activity with 3 fragments, each fragment is a page in my app. The first page is handling all of my data on a list and the second fragment is displaying it on a graph. I want the graph to be updated after some data in the first fragment is deleted/edited/added.
What is the best way to do that?
Upvotes: 1
Views: 615
Reputation: 4912
I think you'd better deliver message to main activity after operation in first fragment and then deliver the same message to second fragment from main activity. You need to use some self-defined callback interfaces.
Here is examples for you. Hope it help. :) http://developer.android.com/training/basics/fragments/communicating.html#DefineInterface
It would be better if you could provide your code so that we can give you more concrete suggestions.
Upvotes: 1