ActionBarSherlock + Google Maps API v2 Duplicate Id

吃可爱长大的小学妹 提交于 2019-12-01 16:44:58
MaciejGórski

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?

Take the id off the Item list fragment in your XML file.

Then put the fragment inside a container layout (LinearLayout). If you need to refer to the fragment go through that layout.

Make sure that you use the onCreateView function instead of the onCreate inside the fragment class.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!