I want to load map fragment in a tabbed activity without showing it so I can start map fragment later without delay.
I have tried using getFragmentManager().findFragmentbyId()
and getSupportFragmentManager().findFragmentbyId()
none worked.
I have also tried returning SupportMapFragment.newInstance()
from SectionPagerAdapter but then it replaces the whole page with map fragment which I do not want.
I have also tried
MapFragment mapFragment = MapFragment.newInstance();
mapFragment.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(GoogleMap googleMap) {
Log.d("intro", "onMapReady");
}
});
but that also doesn't work. Help me make this happen.