Getting Google Map Fragment in onCreateView using ActionBar tabs

ⅰ亾dé卋堺 提交于 2019-11-30 19:09:34

You can get reference to the fragment containing your Map using mViewPager.getItem(0) and then cast to Map fragment and use it any way you like. But this is actually not very good design to operate on fragment from the outside. So I would recommend you to implement all the business logic related to map inside Map fragment, this way you don't need to solve that kind of issue, that you posted and all you business logic is encapsulated inside a fragment, which is portable.

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