Alex Rivera | Logout

Purpose of args parameter of getLoaderManager().initLoader(...,...,...)?

Asked 2011-12-05T00:34:19.120
10

Does anyone have a description of the usage of the Bundle args parameter of initLoader()? Is the object merely set on the resulting cursor or is there a way to get access to that object from the data source being queried - like a Content Provider?

from docs:

args Optional arguments to supply to the loader at construction. If a loader already exists (a new one does not need to be created), this parameter will be ignored and the last arguments continue to be used.

Thank you in advance.

Edit
Report

1 Answer

13

The Bundle args parameter of initLoader() and resetLoader() is used to pass extra information to onCreateLoader(int id, Bundle args). This can be useful to give selection arguments to queries, for instance.

answered 2011-12-13T00:38:31.487

Your Answer