July 2015
Beginner to intermediate
600 pages
18h 59m
English
You have passed data between two activities, and you have passed data between two fragment-based activities. Now you need to pass data between two fragments that are hosted by the same activity – CrimeFragment and DatePickerFragment (Figure 12.9).
Figure 12.9 Conversation between CrimeFragment and DatePickerFragment
To get the Crime’s date to DatePickerFragment, you are going to write a newInstance(Date) method and make the Date an argument on the fragment.
To get the new date back to the CrimeFragment so that it can update the model layer and its own view, you will package up the date ...
Read now
Unlock full access