Duplicate ID, tag null, or parent id with another fragment for com.google.android.gms.maps.MapFragment

前端 未结 23 1597
-上瘾入骨i
-上瘾入骨i 2020-11-22 00:25

I have an application with three tabs.

Each tab has its own layout .xml file. The main.xml has its own map fragment. It\'s the one that shows up when the application

23条回答
  •  礼貌的吻别
    2020-11-22 01:25

    I would recommend replace() rather than attach()/detach() in your tab handling.

    Or, switch to ViewPager. Here is a sample project showing a ViewPager, with tabs, hosting 10 maps.

提交回复
热议问题