onCreateLoader not called when orientation changes

后端 未结 4 1542
余生分开走
余生分开走 2021-01-18 03:16

My problem is basically the same as this one:Sometimes don't get onCreateLoader callback after calling initLoader

I have 2 ListFragments that are co

4条回答
  •  心在旅途
    2021-01-18 03:48

    It appears that this problem occurs when you combine some of activities from support libraries with android.app.LoaderManager.

    I had exactly the same issue with android.support.v7.app.ActionBarActivity and android.app.LoaderManager:

    • initial loading works
    • then when orientation changes loader newer finishes
    • and then when getting back to original orientation it works again.

    By using android.support.v4.app.LoaderManager instead, everything started working perfectly again!

提交回复
热议问题