Android: LoaderCallbacks.OnLoadFinished called twice

前端 未结 10 2267
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 11:05

I noticed strange situation using Android Loaders and Fragments. When I invoke LoaderManager.initLoader() after orientation change onLoadFinished is not called (although doc

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 11:40

    If implementing AppCompatActivity, double check you are using getSupportLoaderManager() in all cases (destroyLoader/initLoader etc). I had mistakenly used getSupportLoaderManager() in conjunction with a getLoaderManager() and suffered the same issue.

提交回复
热议问题