@Override
 public void registerComponents(Context context, Glide glide) {
   OkHttpClient client =
       new OkHttpClient.Builder().addNetworkInterceptor(new StethoInterceptor()).build();
   glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(client));
 }
示例#2
0
 @Override
 protected void setup(Context context, BaasBox box, Options.Empty empty) {
   Glide glide = Glide.get(context);
   glide.register(BaasFile.class, InputStream.class, new BaasFileModelLoader.Factory());
   glide.register(BaasAssetId.class, InputStream.class, new BaasAssetModelLoader.Factory());
 }