I am just starting to use MapFragment (or actually SupportedMapFragment as I'm targeting API 8). I never used MapView (V1) in the past.
What I notice is that on MapView one was told to make the lifecycle calls (onPause() etc) from the Activity, but there is nothing documented about doing that in (Supported)MapFragment, although it does appear to have the same methods as MapView.
Does one have to or not?
Fragment
s handle their own lifecycle, which is one of the things that's really nice about them. If you're asking whether you have to explicitly call onResume
, onPause
, etc... on a MapFragment
, the answer is no.
The point of Fragment
s is to have modular pieces of UI that you can drop into different parts of the app. For example, you could have a map fragment and a list fragment that you toggle between on phones, but have both of them side by side on tablets.