replace

open fun <Model, Data> replace(    modelClass: Class<Model>,     dataClass: Class<Data>,     factory: ModelLoaderFactory<out Model, out Data>): Registry

Removes all default and previously registered ModelLoaderFactorys for the given data and model class and replaces all of them with the single ModelLoader provided.

If you're attempting to add additional functionality or add a backup that should run only after the default ModelLoaders run, use append. This method should be used only when you want to ensure that Glide's default ModelLoaders do not run.

One good use case for this method is when you want to replace Glide's default networking library with your OkHttp, Volley, or your own implementation. Using prepend or append may still allow Glide's default networking library to run in some cases. Using this method will ensure that only your networking library will run and that the request will fail otherwise.

See also

Parameters

modelClass

The model class (e.g. URL, file path).

dataClass

the data class (e.g. java.io.InputStream, ).