Forcing Android to not redraw activity on orientation change

前端 未结 8 906
小鲜肉
小鲜肉 2020-12-11 11:41

I have been going gaga to figure this out.
Although I have read a lot that on Orientation Change, Android kills an activity and starts it as a fresh one, and the only w

8条回答
  •  生来不讨喜
    2020-12-11 12:14

    Just answered this question earlier: Android - screen orientation reloads activity

    In your case you want to completely prevent Android from killing your Activity. You'll need to update your manifest to catch the orientation change, then implement the orientation change callback to actually do whatever you need to do (which may be nothing) when an orientation change occurs.

提交回复
热议问题