Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 409
user1080691 Avatar asked Dec 05 '11 00:12

user1080691


1 Answers

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.

like image 192
ptc Avatar answered Oct 04 '22 18:10

ptc