MapView.onMapReady never called in Fragment for load Google Map in MapView

后端 未结 6 830
野性不改
野性不改 2021-01-05 09:59

I\'ll try to show a map in my Android application on a fragment named RoeteFragment. If I debug my code I see that the method onMapReady is never c

6条回答
  •  半阙折子戏
    2021-01-05 10:56

    Read MapView documentation. Especially:

    Users of this class must forward all the life cycle methods from the Activity or Fragment containing this view to the corresponding ones in this class. In particular, you must forward on the following methods:

    • onCreate(Bundle)
    • onResume()
    • onPause()
    • onDestroy()
    • onSaveInstanceState()
    • onLowMemory()

提交回复
热议问题