Share via


LoaderManager.InitLoader Method

Definition

Ensures a loader is initialized and active.

[Android.Runtime.Register("initLoader", "(ILandroid/os/Bundle;Landroid/app/LoaderManager$LoaderCallbacks;)Landroid/content/Loader;", "GetInitLoader_ILandroid_os_Bundle_Landroid_app_LoaderManager_LoaderCallbacks_Handler")]
[Java.Interop.JavaTypeParameters(new System.String[] { "D" })]
public abstract Android.Content.Loader? InitLoader (int id, Android.OS.Bundle? args, Android.App.LoaderManager.ILoaderCallbacks? callback);
[<Android.Runtime.Register("initLoader", "(ILandroid/os/Bundle;Landroid/app/LoaderManager$LoaderCallbacks;)Landroid/content/Loader;", "GetInitLoader_ILandroid_os_Bundle_Landroid_app_LoaderManager_LoaderCallbacks_Handler")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "D" })>]
abstract member InitLoader : int * Android.OS.Bundle * Android.App.LoaderManager.ILoaderCallbacks -> Android.Content.Loader

Parameters

id
Int32

A unique identifier for this loader. Can be whatever you want. Identifiers are scoped to a particular LoaderManager instance.

args
Bundle

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.

callback
LoaderManager.ILoaderCallbacks

Interface the LoaderManager will call to report about changes in the state of the loader. Required.

Returns

Attributes

Remarks

Java documentation for android.app.LoaderManager.initLoader(int, android.os.Bundle, android.app.LoaderCallbacks).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to