Back to project page webimageloader.
The source code is released under:
Apache License
If you think the Android project webimageloader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.webimageloader.sample; //from w w w. jav a 2s . c o m import com.squareup.okhttp.OkHttpClient; import com.webimageloader.ConnectionFactory; import com.webimageloader.ImageLoader; import com.webimageloader.ext.ImageLoaderApplication; import java.io.IOException; import java.net.URL; import java.net.URLConnection; public class ExampleApplication extends ImageLoaderApplication { @Override protected ImageLoader.Builder getBuilder() { return super.getBuilder().setConnectionFactory(new OkHttpFactory()); } private static class OkHttpFactory implements ConnectionFactory { private final OkHttpClient client = new OkHttpClient(); @Override public URLConnection openConnection(URL url) throws IOException { return client.open(url); } } }