Created
November 17, 2014 16:03
-
-
Save theblang/d5bf6d1862dd6678fce1 to your computer and use it in GitHub Desktop.
SupportMapFragment loads slowly the first time
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
private SupportMapFragment supportMapFragment; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { | |
View view = inflater.inflate(R.layout.fragment_map, container, false); | |
supportMapFragment = SupportMapFragment.newInstance(); | |
getChildFragmentManager().beginTransaction().replace(R.id.map_container, supportMapFragment).commit(); | |
return view; | |
} | |
@Override | |
public void onViewCreated(View view, Bundle savedInstanceState) { | |
super.onViewCreated(view, savedInstanceState); | |
} | |
@Override | |
public void onStart() { | |
super.onStart(); | |
final GoogleMap googleMap = supportMapFragment.getMap(); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment