Loader

Load data for your UI that survives configuration changes.
Latest Update Stable Release Release Candidate Beta Release Alpha Release
October 9, 2019 1.1.0 - - -

Declaring dependencies

To add a dependency on Loader, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

Groovy

dependencies {
    implementation "androidx.loader:loader:1.1.0"
}

Kotlin

dependencies {
    implementation("androidx.loader:loader:1.1.0")
}

For more information about dependencies, see Add build dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.1.0

Version 1.1.0

October 9, 2019

androidx.loader:loader:1.1.0 is released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

  • Default Executor Change: The default Executor for AsyncTaskLoader (and, by extension, CursorLoader) is now AsyncTask.THREAD_POOL_EXECUTOR rather than a custom Executor.
  • Setting a custom Executor: custom implementations of AsyncTaskLoader or its subclasses can now override getExecutor() to set a custom Executor.

Version 1.1.0-rc01

June 5, 2019

androidx.loader:loader:1.1.0-rc01 is released with no changes from 1.1.0-beta01.

Version 1.1.0-beta01

March 13, 2019

androidx.loader:loader:1.1.0-beta01 is released. The full list of commits included in this version can be found here.

Bug fixes

  • Fixed an issue which would cause a StaleDataException when restarting loader from onLoadFinished (b/123922776)

Version 1.1.0-alpha01

December 3, 2018

New features

  • Added a getExecutor() method to AsyncTaskLoader to allow you to set a custom Executor (aosp/810773)

Behavior changes

  • The default Executor for AsyncTaskLoader is now AsyncTask.THREAD_POOL_EXECUTOR rather than a custom Executor.