Created
August 20, 2014 00:57
-
-
Save tophyr/ed0ec9ff0fc5bb246670 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class FooFragment { | |
public interface IFooFragment { | |
void onMapReady(GoogleMap map); | |
} | |
somewhereLaterInCode() { | |
((IFooFragment)getActivity()).onMapReady(myMap); | |
} | |
} | |
public class MainActivity implements FooFragment.IFooFragment { | |
. | |
. | |
. | |
@Override | |
public void onMapReady(GoogleMap map) { | |
((SomeOtherFragment)(getFragmentManager().getFragmentByTag("some_other_fragment"))).setMap(map); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment