Android onCreate() Method called twice when device rotated. (ICS)

后端 未结 3 837
余生分开走
余生分开走 2021-01-14 05:35

I\'m developing on an android tablet application and I have to manage application orientation. I got a problem that every time when I rotate the device onCreate() will be ca

3条回答
  •  星月不相逢
    2021-01-14 06:35

    onCreate() will always be called because when orientation changes the Activity is always recreated. There is nothing wrong with that. You should implement proper behaviour for this or disable the possibility of changing the orientation by adding orientation=horizontal to manifest for instance

提交回复
热议问题