Ferzinha Fil
Ferzinha Fil

Reputation: 142

Android / Fragment - How do I pass parameters of the Last Fragment and send to Previous Fragment?

Upvotes: 1

Views: 126

Answers (2)

lorraine batol
lorraine batol

Reputation: 6281

You can send a broadcast when you hit the back button in Fragment B to Fragment A with the parameters you need put in the bundle, and have broadcast receiver on the Fragment A.

Hope this helps!

Upvotes: 1

AdamM
AdamM

Reputation: 162

Your activity can implement a custom listener interface on the Activity and use a reference to it in your fragment to pass the communication back.

Upvotes: 1

Related Questions