將讀取到的圖片加載到gridview中,時不時會出現有的圖片在imageview上顯示為空白,沒有顯示為默認的picture_no說明已經加載了圖片文件,但顯示不出來又是什么意思呢?有人碰到這個問題沒?
2016-08-29
height = getImageViewFieldValue(imageView, "mMaxWidth");
-----------分割線--------------
height = getImageViewFieldValue(imageView, "mMaxHeight");
我程序一直內存溢出,發現這里有問題“獲取最大寬度和最大高度, 由于item的<imageView>中width為match_parent,導致寬度獲取失敗,圖片對比壓縮也就失敗,最后導致內存溢出,所以有跟我同樣問題的可以看看設置。我改width = imageView.getMaxWidth();
-----------分割線--------------
height = getImageViewFieldValue(imageView, "mMaxHeight");
我程序一直內存溢出,發現這里有問題“獲取最大寬度和最大高度, 由于item的<imageView>中width為match_parent,導致寬度獲取失敗,圖片對比壓縮也就失敗,最后導致內存溢出,所以有跟我同樣問題的可以看看設置。我改width = imageView.getMaxWidth();
java.lang.OutOfMemoryError: Failed to allocate a 51916812 byte allocation with 16777216 free bytes and 31MB until OOM
怎么總是報溢出錯誤呢
怎么總是報溢出錯誤呢
2016-08-27