Monday, June 9, 2014

Android Fragment communication


1. create interface
2. implement in main activity
3. add respond method
4. in respond method call fragment 2
5. in fragment B do change data
6. in fragment A define Communicator
7 initiate Communicator
8 onclick call respond, which pass data to Mainactivity because Main Activity implement Communicator
9 call fragment B respond
10 call fragment  change data
11. in fragment B do change data

No comments:

Post a Comment