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

前端 未结 6 1988
不知归路
不知归路 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:04

    main class should extend FragmentActivity and not Activity.

    also look up Activity life cycle on the android doc

提交回复
热议问题