addGlobalRequestListener
Adds a global RequestListener that will be added to every request started with Glide.
Multiple RequestListeners can be added here, in RequestManager scopes or to individual RequestBuilders. RequestListeners are called in the order they're added. Even if an earlier RequestListener returns true
from onLoadFailed or onResourceReady, it will not prevent subsequent RequestListeners from being called.
Because Glide requests can be started for any number of individual resource types, any listener added here has to accept any generic resource type in onResourceReady. If you must base the behavior of the listener on the resource type, you will need to use instanceof
to do so. It's not safe to cast resource types without first checking with instanceof
.