Android: navigating up to the parent activity recreates the parent activity

前端 未结 2 1252
栀梦
栀梦 2021-01-06 01:44

I have a SearchAcvitity which has a child PersonActivity. Each are FragmentActivity\'s. Here\'s my manifest file:



        
2条回答
  •  不知归路
    2021-01-06 02:12

    I think someone may have asked the question before: onCreate being called on Activity A in up navigation

    Basically it is expected behavior. You need to save state into the bundle, which you can restore in onCreate.

提交回复
热议问题