How best to re-create markers/polylines when phone is rotated (orientation change)

后端 未结 2 1784
天涯浪人
天涯浪人 2021-02-07 12:35

Background:

  • Developing a native Android App that uses Android Google Map v2, uses android.support.v4.app.FragmentActivity. Runs on An
2条回答
  •  旧巷少年郎
    2021-02-07 13:21

    It seems to me that calling setRetainInstance(true); on the fragment that holds the map retains everything on the map through pauses, orientation changes, etc, without having to worry about setting and getting. Is there some reason why this isn't the recommended approach?

提交回复
热议问题