Hi,
Jin Izzraeel
2

Hi,

Since Loaders live in the scope of the Fragment, the LOADER_ID should be unique within an instance of a fragment. So if you want to have two Loaders within the same Fragment, they need to have different ids, but you can use the same id in two different Fragments instances. Thats what I was meaning with unique within the Fragment but no globally unique.

I will try to put an example. Lets say you have an Activity with two Fragments inside. The following assignation of ids would be valid:

  • Fragment1 -> Loader1 (id_value=1), Loader2 (id_value=2)
  • Fragment2 -> Loader1 (id_value=1)

I hope know it is a bit more clear.

Show your support

Clapping shows how much you appreciated Antonio Gutierrez’s story.