I have an app having actionbar where one of the fragments contain a mapFragment. Also, i've to make an overlay of list on top of the map. MapFragment as of now as lesser functionality(i cant make setInfoWindowAdapter to work in it).So my question is should I be using Mapview within a fragment or MapFragment within in a fragment? which is the best practice? I've read through many articles but none them exactly mention which is the best option and why.
Asked
Active
Viewed 7,079 times
1 Answers
2
Both are correct if done correct.
Fragments inside fragments are supported as of support library v11.
Two things to remember:
- you cannot put MapFragment to xml
- you have to use getChildFragmentManager
Check this link for how to correctly add MapFragment inside your fragment: http://code.google.com/p/gmaps-api-issues/issues/detail?id=5064#c1

MaciejGórski
- 22,187
- 7
- 70
- 94
-
Yeah, i have the mapfragment working inside the fragment. Just wanted an opinion thank u! – Amritha Dilip Apr 13 '13 at 04:24