Forcing Android to not redraw activity on orientation change

前端 未结 8 890
小鲜肉
小鲜肉 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:25

    if you are doing a lot of networking inside Asynchronous task maybe you should use onRetainNonConfigurationInstance() ans then get the data back in your onCreate() method like this tutorial or this

提交回复
热议问题