Loaders in Android

Loaders providing Asynchronous loading data into an activity or fragment.When the data changes, it automatically update the new results.It automatically reconnect last loader when its recreated. So, no need to re query.

Starting the Loader:

we can initilize loader in onCreate() method.

getLoaderManager().initLoader(0,null, this);

initLoader takes the following parameters

unique id. In the above unique id is 0.
argument to supply to loader at construct (optional).

LoaderManager calls to report loader events.


Popular posts from this blog

What is Android ?