Skip to content

Instantly share code, notes, and snippets.

@leeyc09
Created January 15, 2016 09:35
Show Gist options
  • Save leeyc09/ca6d69a1482af4ae0c42 to your computer and use it in GitHub Desktop.
Save leeyc09/ca6d69a1482af4ae0c42 to your computer and use it in GitHub Desktop.
fresco OkHttpImagePipelineConfigFactory use Okhttp3
package Your.package
import com.facebook.imagepipeline.core.ImagePipelineConfig;
import android.content.Context;
import okhttp3.OkHttpClient;
/**
* Created by user on 2016-01-15.
*/
public class OkHttpImagePipelineConfigFactory {
public static ImagePipelineConfig.Builder newBuilder(Context context, OkHttpClient okHttpClient) {
return ImagePipelineConfig.newBuilder(context)
.setNetworkFetcher(new OkHttpNetworkFetcher(okHttpClient));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment