0

I have an Activity A that contains a Fragment B that contains a Fragment C.

Currently, Fragment B's LoaderManager manages one CursorLoader. The data is given to Fragment C.

On orientation change, the loader is lost: initLoader always leads to onCreateLoader being invoked by the system. However, the documentation says:

If the loader doesn't already exist, one is created and (if the activity/fragment is currently started) starts the loader. Otherwise the last created loader is re-used.

How do I get this behaviour?

Jonas
  • 534
  • 8
  • 16

1 Answers1

2

It's an open bug, Google is aware and hopefully plan on fixing it

https://code.google.com/p/android/issues/detail?id=183783

MLProgrammer-CiM
  • 17,231
  • 5
  • 42
  • 75
  • Can I ask a stupid question: does this mean 1) users will have to wait for an OS update or 2) I just wait for a new "compileSdkVersion" against which to compile my code? or 3) something else? I am a bit confused about how my code interacts with the OS version on the phone. – Jonas Sep 16 '15 at 16:59
  • You can target a lower version of the appcompat library and you should not have this issue until they either fix it or issue a statement about it. – Chris Thoma Sep 16 '15 at 17:26