I want to have SupportMapFragment in one of my Activity. I add this fragment directly to layout xml and this layout set as content view. But when Activity is launched for th
For me it was way slower than 1sec beause i was using:
mapFragment.getMap();
Then i changed to:
mapFragment.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(GoogleMap googleMap) {
map = googleMap;
}
});
Using the getMapAsync() it won't block the ui, so your activity will load before the map. It's still slow, but at least you can show a loading message.