To add Glide app you need to add:
implementation 'com.github.bumptech.glide:glide:4.8.0'
Then you can use
Glide.with(..)
That code uses default Glide.
If you want to have customized Glide, you will need to add
for kotlin:
kapt 'com.github.bumptech.glide:annotations:4.9.0'
or for java:
annotationProcessor 'com.github.bumptech.glide:annotations:4.9.0'
Once when you Sync the project, you need to add Glide module class in your project:
@GlideModule
public class CustomGlideModule extends AppGlideModule {
@Override
public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) {
//register some components
}
}
Once when you rebuild the project, new class GlideApp will be autogenerated.
You can now use Glide with the following code:
GlideApp.with(..)