Closed fishzhe closed 9 years ago
It happens a lot when the app just started. But after a while it will disapper
This is because the image from nasa is too big for my device. In order to make it suit every device, I use display manage to get display size. Then take the display size to decode image. Note, the inputstream returned by URLConnection doesn't suppor mark. So need to convert the data into byte array first, then decode the image according to device display size. This solution is validated on my htc device. Next step validate on other device.
http://developer.android.com/training/displaying-bitmaps/load-bitmap.html, this link is how to load and display big image.
Merge with out of memory 2. And using Picasso lead to no need to worry about this.
Click on refresh button will cause OutOfMemoryError. Caused by loading bitmap.