Class AppGlideModule

java.lang.Object
com.bumptech.glide.module.LibraryGlideModule
com.bumptech.glide.module.AppGlideModule

public abstract class AppGlideModule extends LibraryGlideModule
Defines a set of dependencies and options to use when initializing Glide within an application.

There can be at most one AppGlideModule in an application. Only Applications can include a AppGlideModule. Libraries must use LibraryGlideModule.

Classes that extend AppGlideModule must be annotated with GlideModule to be processed correctly.

Classes that extend AppGlideModule can optionally be annotated with Excludes to optionally exclude one or more LibraryGlideModule and/or GlideModule classes.

Once an application has migrated itself and all libraries it depends on to use Glide's annotation processor, AppGlideModule implementations should override isManifestParsingEnabled() and return false.

  • Constructor Details

    • AppGlideModule

      public AppGlideModule()
  • Method Details

    • isManifestParsingEnabled

      public boolean isManifestParsingEnabled()
      Returns true if Glide should check the AndroidManifest for GlideModules.

      Implementations should return false after they and their dependencies have migrated to Glide's annotation processor.

      Returns true by default.

    • applyOptions

      public void applyOptions(@NonNull Context context, @NonNull GlideBuilder builder)