You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
SupportMapFragment only retains a reference to a single OnMapReadyCallback, which it passes to its MapView in onStart(). It does not test this reference for null. Nor does it clear this reference, so the callback will be called again every time onStart() runs. Compare this to the behavior of MapView, which retains a collection of callbacks and removes them as they are called.
Is there a reason SupportMapFragment#getMapAsync(...) doesn't simply call through to MapView#getMapAsync(...)?
The text was updated successfully, but these errors were encountered:
Forwarding the fragment's getMapAsync(...) directly to MapView#getMapAsync(...) seems to work fine. The only problem is that Fragment#onCreate(...) is called before Fragment#onCreateView(...), so the fragment still has to store and forward callbacks before onCreateView(...).
SupportMapFragment
only retains a reference to a singleOnMapReadyCallback
, which it passes to itsMapView
inonStart()
. It does not test this reference for null. Nor does it clear this reference, so the callback will be called again every timeonStart()
runs. Compare this to the behavior ofMapView
, which retains a collection of callbacks and removes them as they are called.Is there a reason
SupportMapFragment#getMapAsync(...)
doesn't simply call through toMapView#getMapAsync(...)
?The text was updated successfully, but these errors were encountered: