Show a large image very un-effective
When load a large image(3k*5k), the app may be no response...
In nexus5 (4.4.2), it's ok. In nexus6 (5.1), the app is no response...
Perhaps you should resize your image first. See Resizing.
Normally, we do not support that big images. 3k * 5k * 4Bpp = 60 MB. On 5.1 (Lollipop) that single image (unless resized) would eat the whole java heap of your application. On older versions of android we will allocate that image on the native heap which doesn't have such strict limits as java heap, but it is still not okay to load a 60MB image in memory. You should really resize the image first. Let us know if that helps.
I know the Resize Option, but i don't know the image's size (load from web), how to deal with it?
You don't need to know your image's size. You only need to know your view size. If you don't know the exact size, estimate. You could start with the screen resolution of your device, if a full-screen image. If you think it would be, say, one fifth of the full screen, choose the resolution / 5.
I've just created a 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 https://github.com/Piasy/BigImageViewer , hope it helps :)