android - How to get the object of fragmentA from fragmentB in a Activity -


what have

  • i have activity
  • mainactivity.java here in activity have fragment(mainfragment.java)
  • in mainfragment.java have 2 child fragments childone.java , childtwo.java
  • i have edittext in childone.java

what trying do:

  • i need value in edittext of childone.java childtwo.java
  • how achieve !

you define interface in fragment a, , let activity implement interface. can call interface method in fragment, , activity receive event.

check link basic communication between 2 fragments

hope answer helpful friend :)


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -