Interface that is implemented to discover when a Loader has been canceled
before it finished loading its data. You do not normally need to implement
this yourself; it is used in the implementation of LoaderManager
to find out when a Loader it is managing has been canceled so that it
can schedule the next Loader. This interface should only be used if a
Loader is not being used in conjunction with LoaderManager.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Loader.OnLoadCanceledListener\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:loader:28.0.0-alpha1 \n\nLoader.OnLoadCanceledListener\n=============================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\nstatic\n\n\ninterface\nLoader.OnLoadCanceledListener\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------------------|\n| android.support.v4.content.Loader.OnLoadCanceledListener\\\u003cD\\\u003e |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface that is implemented to discover when a Loader has been canceled\nbefore it finished loading its data. You do not normally need to implement\nthis yourself; it is used in the implementation of [LoaderManager](/reference/android/support/v4/app/LoaderManager)\nto find out when a Loader it is managing has been canceled so that it\ncan schedule the next Loader. This interface should only be used if a\nLoader is not being used in conjunction with LoaderManager.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onLoadCanceled](/reference/android/support/v4/content/Loader.OnLoadCanceledListener#onLoadCanceled(android.support.v4.content.Loader\u003cD\u003e))`(`[Loader](/reference/android/support/v4/content/Loader)`\u003cD\u003e loader) ` Called on the thread that created the Loader when the load is canceled. |\n\nPublic methods\n--------------\n\n### onLoadCanceled\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \n\n```\nvoid onLoadCanceled (Loader\u003cD\u003e loader)\n```\n\nCalled on the thread that created the Loader when the load is canceled.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------------------------------------------|\n| `loader` | `Loader`: the loader that canceled the load \u003cbr /\u003e |\n\n-\n\n Interfaces\n ----------\n\n - [Loader.OnLoadCanceledListener](/reference/android/support/v4/content/Loader.OnLoadCanceledListener)\n - [Loader.OnLoadCompleteListener](/reference/android/support/v4/content/Loader.OnLoadCompleteListener)\n-\n\n Classes\n -------\n\n - [AsyncTaskLoader](/reference/android/support/v4/content/AsyncTaskLoader)\n - [ContentResolverCompat](/reference/android/support/v4/content/ContentResolverCompat)\n - [ContextCompat](/reference/android/support/v4/content/ContextCompat)\n - [CursorLoader](/reference/android/support/v4/content/CursorLoader)\n - [FileProvider](/reference/android/support/v4/content/FileProvider)\n - [IntentCompat](/reference/android/support/v4/content/IntentCompat)\n - [Loader](/reference/android/support/v4/content/Loader)\n - [Loader.ForceLoadContentObserver](/reference/android/support/v4/content/Loader.ForceLoadContentObserver)\n - [LocalBroadcastManager](/reference/android/support/v4/content/LocalBroadcastManager)\n - [MimeTypeFilter](/reference/android/support/v4/content/MimeTypeFilter)\n - [PermissionChecker](/reference/android/support/v4/content/PermissionChecker)\n - [SharedPreferencesCompat](/reference/android/support/v4/content/SharedPreferencesCompat)\n - [SharedPreferencesCompat.EditorCompat](/reference/android/support/v4/content/SharedPreferencesCompat.EditorCompat)\n - [WakefulBroadcastReceiver](/reference/android/support/v4/content/WakefulBroadcastReceiver)"]]