How to put Google Maps V2 on a Fragment using ViewPager

前端 未结 13 1971
攒了一身酷
攒了一身酷 2020-11-22 04:56

I am trying to do a tab layout same in Play Store. I got to display the tab layout using a fragments and viewpager from androidhive. However, I can\'t implement google maps

13条回答
  •  既然无缘
    2020-11-22 05:30

    You can use this line if you want to use GoogleMap in a fragment:

    
    

    GoogleMap mGoogleMap = ((SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map)).getMap();
    

提交回复
热议问题