I'm trying to integrate the ActionBarSherlock with Google Maps API v2 fragments.
I have a layout with 2 fragments: one for a list layout and another with a SupportMapFragment.
When I click on a list item first go well but when I click on a list item second time, it throws an error: " Duplicate id 0x7f040038, tag null, or parent id 0x0 with another fragment for com.google.android.gms.maps.SupportMapFragment"
I tried several solutions and none of them have been able to fix it. Is there something I'm doing wrong? Please help me!!
I modified ActionBarSherlock to include SherlockMapFragment implemented to support the new SupportMap (as shown here: https://gist.github.com/4392030).
This is my code: https://github.com/inigo-jimenez/TestGoogleMaps
This is not a problem with ActionBarSherlock, but a broader one when you have SupportMapFragment inside your custom fragment.
You need to use getChildFragmentManager() to add SupportMapFragment and not through xml.
Take a look at my answer here: MapFragment in Fragment, alternatives?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With