Passing Data Between Two Fragments

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.8).

Figure 12.8  Conversation between CrimeFragment and DatePickerFragment

Figure shows Conversation between CrimeFragment and DatePickerFragment.

To get the Crime’s date to DatePickerFragment, you are going ...

Get Android Programming: The Big Nerd Ranch Guide, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.