MapFragment in ScrollView

前端 未结 8 1793
再見小時候
再見小時候 2020-12-07 17:17

I have one of the new MapFragments in a ScrollView. Actually it\'s a SupportMapFragment, but anyway. It works, but there are two problems:

8条回答
  •  半阙折子戏
    2020-12-07 18:14

    For the second part of the question - you can derive a fragment class from SupportMapFragment, and use that in your layout instead. You can then override Fragment#onCreateView, and instantiate your custom MapView there.

    If that does not work, you can always create your own fragment - then you just need to take care of calling all the lifecycle methods yourself (onCreate, onResume, etc). This answer has some more details.

提交回复
热议问题