[android-developers] OOM exception with custom imageadapter

2010-04-26 Thread Lars
Hi I have a gallery in wich I show a row of images, the images can both be from the Camera gallery or from the internet as a web url. My getView() method makes an exception when I put to many images from the gallery inside it. Should i down sample the images before attaching them to the view? and

Re: [android-developers] OOM exception with custom imageadapter

2010-04-26 Thread Romain Guy
Hi, As written, your getView() method *never* reuses the convertView parameter. This means you are creating new Views and new Bitmaps every time the method is called, which happen very often while scrolling/flinging a grid. You first need to start using the convertView when possible (if