AsyncTask with screen rotation - onRetainNonConfigurationInstance deprecated

后端 未结 2 1002
小鲜肉
小鲜肉 2021-01-12 22:23

I am still trying to find the \"correct\" design pattern when dealing with AsyncTasks and screen rotation. I read this commonsware blog post which links to thi

2条回答
  •  天命终不由人
    2021-01-12 22:42

    There's nothing inherently wrong with using a deprecated method. If your AsyncTask is THAT critical that you can't cancel it and start it up again if your orientation changes, you should consider using a service.

提交回复
热议问题