Show the big picture at the request without sacrificing picture quality, the width and height requirements are original width and height, I have temporarily increased the cache, although no OOM error, but if the picture is too large will not be displayed. As follows:
1.listview only one child inside imageview
2 sd card is loaded inside the picture
3 Use a soft references SoftReference softReference
4 pictures if less than 1mb no problem, if not more than 1mb throw an exception, but the picture does not show up, the code is as follows:. The local picture is loaded into the drawable code:
Drawable Drawable cacheImage = obtained by calling the above codeif (cacheImage! = null) { viewHolder.iv_img.setImageDrawable (cacheImage); }
Reply: No solution Reply: Their top one, solve, thank you, the answer immediately Results posted Reply: And do not use soft references with bitmap drawable Reply:
1 I use soft references I have problems with drawable now 2 is a placeholder for the picture came out, that is occupying the place does not display the contents of the picture, is a transparent thing. Bitmap can be avoided with this situation? Why? Thank you Reply: bitmap can save because ultimately passed into drawable form part of the memory bitmap display Reply:
still do not use soft references drawable with bitmap
I tried, not, whether it is drawable or bitmap images are not displayed. Reply:
And do not use soft references drawable with bitmap
I tried, not, whether it is drawable or bitmap images are not displayed.
Carolina on only Image compression method can be used if the clarity of the picture, then do not ask Reply:
And do not use soft references drawable with bitmap
I tried, not, whether it is drawable or bitmap images are not displayed.
Carolina on only Image compression method can be used if the clarity of the picture do not ask if
The picture is demanding, no way. I can only upload in the background when to limit the size of the picture Reply: lz get out? ? I have encountered similar problems
No comments:
Post a Comment