[转自] GridView重复调用getView问题
在GridView中加载图片时导致OOM,原因是GridView中多次调用了getView()方法,处理如下:
//初始化convertView
...
if (position == 0) {
mCount++;
} else {
mCount = 0;
}if (mCount > 1) { //避免多次处理position = 0的情况
return convertView;
}
//do something
...