onCreate() and onCreateView() invokes a lot more than required (Fragments)

前端 未结 6 1983
不知归路
不知归路 2021-01-30 10:19

Can somebody explain why the onCreate() and onCreateView() are being invoked so many times which increments with each orientation change?

Here

6条回答
  •  既然无缘
    2021-01-30 11:10

    If you don't use different layouts for different orientations, I think that you should use android:configChanges="orientation" in your manifest. http://developer.android.com/guide/topics/manifest/activity-element.html#config

提交回复
热议问题