Piasy / BigImageViewer

Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻
MIT License
3.98k stars 402 forks source link

fix: java.lang.NullPointerException #130

Closed nukc closed 6 years ago

nukc commented 6 years ago

please see https://github.com/Piasy/BigImageViewer/issues/129

Piasy commented 6 years ago

I think FrescoImageViewFactory has the same problem, could you please fix it too?

nukc commented 6 years ago

I check it now

nukc commented 6 years ago

造成 null 的原因主要还是我这边是直接 new BigImageView(context); 也想过从构造方法入手,但想了下 mThumbnailView 并不是必须的也就不一定要初始化 mThumbnailScaleType, 但目前来说,直接判断 null 是最简单且有效的。

Google translate: The main reason for causing null is that I am use new BigImageView(context); I also thought about starting with the constructor, but I thought that mThumbnailView is not necessary and I don't have to initialize mThumbnailScaleType , but for now, it is the easiest and most effective to judge whether it is null or not.

Piasy commented 6 years ago

v1.5.6 is released, check it out!