All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bumptech.glide.integration.okhttp3.OkHttpGlideModule Maven / Gradle / Ivy

There is a newer version: 5.0.0-rc01
Show newest version
package com.bumptech.glide.integration.okhttp3;

import android.content.Context;
import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.Registry;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.module.GlideModule;
import java.io.InputStream;

/**
 * A {@link com.bumptech.glide.module.GlideModule} implementation to replace Glide's default
 * {@link java.net.HttpURLConnection} based {@link com.bumptech.glide.load.model.ModelLoader}
 * with an OkHttp based {@link com.bumptech.glide.load.model.ModelLoader}.
 *
 * 

If you're using gradle, you can include this module simply by depending on the aar, the * module will be merged in by manifest merger. For other build systems or for more more * information, see {@link com.bumptech.glide.module.GlideModule}.

* * @deprecated Replaced by {@link OkHttpLibraryGlideModule} for Applications that use Glide's * annotations. */ @Deprecated public class OkHttpGlideModule implements GlideModule { @Override public void applyOptions(Context context, GlideBuilder builder) { // Do nothing. } @Override public void registerComponents(Context context, Registry registry) { registry.replace(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy