Can someone tell me what is the right way to call a function in one fragment from another fragment?
I passed the object of one fragment to another fragemnt as serializable. but I dont think thats the right way.
I saw this question but the accepet answer just says activities should mediate all communications between fragments. can someone pls tell me what is the code to access an other fragment in the same activity by using activity as mediator?
Please try reading the Guide to using fragments.
If you want Fragment_A to comunicate with Fragment_B, you should define an interface inside
Fragment_A (which the parent activity has to implement) to send
data from Fragment_A to parent activity and from the parent activity send that data to Fragment_B.
I hope I helped.