public abstract class AppGlideModule extends LibraryGlideModule
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 and Description |
|---|
AppGlideModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyOptions(Context context,
GlideBuilder builder)
Lazily apply options to a
GlideBuilder immediately before the Glide
singleton is created. |
boolean |
isManifestParsingEnabled()
Returns
true if Glide should check the AndroidManifest for GlideModules. |
registerComponentspublic boolean isManifestParsingEnabled()
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.
public void applyOptions(Context context, GlideBuilder builder)
GlideBuilder immediately before the Glide
singleton is created.
This method will be called once and only once per implementation.
context - An Application Context.builder - The GlideBuilder that will be used to create Glide.