Created
December 9, 2015 11:14
-
-
Save subodh-malgonde/e06552e02b3e1b083375 to your computer and use it in GitHub Desktop.
Boilerplate introduced by activity to fragment communication in the Android framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FragmentManager fragmentManager = getFragmentManager(); | |
FragmentA fragmentA = (FragmentA) fragmentManager.findFragmentByTag(FragmentA.TAG); | |
if(fragmentA != null && fragmentA.isAdded()){ | |
fragmentA.foo() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment