SherlockGougou / BigImageViewPager

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

加载长图,把图片设置为第一个,他就显示不出来 #44

Closed oveeeee closed 5 years ago

oveeeee commented 5 years ago

https://wx2.sinaimg.cn/mw690/684ff39bly1g20z34h5ilj20kr7fekef.jpg 这个是图片链接

就是当这个图片是第一个打开的时候,他就不会显示,但是当打开其他图片再滑到这个图片他就能显示

oveeeee commented 5 years ago

而且你上下滑动的时候能看出来他是加载出来了,就是不显示

SherlockGougou commented 5 years ago

你好,我使用demo测试你发的图片url,放到第一位,未发现你说的问题。

oveeeee commented 5 years ago

你好,我使用demo测试你发的图片url,放到第一位,未发现你说的问题。

我也是用的你的源码测试的呀.. imageInfo = new ImageInfo(); imageInfo.setOriginUrl("https://wx2.sinaimg.cn/mw690/684ff39bly1g20z34h5ilj20kr7fekef.jpg"); imageInfoList.add(0,imageInfo);

重复打开十多次,他偶尔会出现一次显示

SherlockGougou commented 5 years ago

也这样测试过了,未发现问题,你可以用一闪录个视频发一下吗?

oveeeee commented 5 years ago

我用虚拟机测试了下,发现可以打开。不知道是不是手机的原因

oveeeee commented 5 years ago

换了个手机发现能用,可能是手机的原因,魅蓝note3

SherlockGougou commented 5 years ago

因为显示图片的框架使用了Skia编码引擎,但是联发科的处理器对Skia的某些编码模式支持不是很好,可能会出现一些意外情况。

oveeeee commented 5 years ago

因为显示图片的框架使用了Skia编码引擎,但是联发科的处理器对Skia的某些编码模式支持不是很好,可能会出现一些意外情况。

有什么好的解决办法吗,就是第一张图片是长图无法显示的问题

SherlockGougou commented 5 years ago

你可以再测试一下,注意观察图片无法显示时的logcat信息,如果有报错或者警告之类的信息,麻烦回复一下。

oveeeee commented 5 years ago

2019-04-15 16:43:10.287 19896-20028/cc.shinichi.bigimageviewpager W/OpenGLRenderer: Bitmap too large to be uploaded into a texture (690x8891, max=8192x8192)

oveeeee commented 5 years ago

这个加载长图使用的是subsampling-scale-image-view吧。我试了下他那个可以使用

oveeeee commented 5 years ago

问题已解决,在loadImageSpec(imagePath, imageView, imageGif, progressBar)之前,延迟500毫秒,再加载就可以显示。