SherlockGougou / BigImageViewPager

🔥🔥🔥 BigImage ImageView ViewPager 支持超长图、超大图的图片浏览器,优化内存,支持手势放大、下拉关闭、查看原图、加载百分比、保存图片等功能。
Other
2.14k stars 248 forks source link

点击查看原图,加载还是1% #170

Closed XuHX closed 2 years ago

XuHX commented 2 years ago

screenshot 2022-01-27_132825

SherlockGougou commented 2 years ago

你这不是使用了kotlin的嘛?annotationProcessor改成kapt

XuHX commented 2 years ago

改了也还是这种情况

SherlockGougou commented 2 years ago
@GlideModule
public class MyAppGlideModule extends AppGlideModule {
  @Override
  public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) {
    super.registerComponents(context, glide, registry);

    // 替换底层网络框架为okhttp3,这步很重要!如果不添加会无法正常显示原图的加载百分比,或者卡在1%
    // 如果你的app中已经存在了自定义的GlideModule,你只需要把这一行代码,添加到对应的重载方法中即可。
    registry.replace(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(ProgressManager.getOkHttpClient()));
  }
}

这个做了吗?

XuHX commented 2 years ago
@GlideModule
public class MyAppGlideModule extends AppGlideModule {
  @Override
  public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) {
    super.registerComponents(context, glide, registry);

    // 替换底层网络框架为okhttp3,这步很重要!如果不添加会无法正常显示原图的加载百分比,或者卡在1%
    // 如果你的app中已经存在了自定义的GlideModule,你只需要把这一行代码,添加到对应的重载方法中即可。
    registry.replace(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(ProgressManager.getOkHttpClient()));
  }
}

这个做了吗? 做了

SherlockGougou commented 2 years ago

看一下你的这个自定义GlideModule有没有被引用的,如果没有说明没生效。

XuHX commented 2 years ago

解决了,原图地址错误,查看原图显示1%

SherlockGougou commented 2 years ago

好的。