I am getting a error, "cannot generate texture from bitmap" when trying to populate a listview with images. I am using aquery to download, caching and retrieving them.
I have an ArrayAdapter, and a serie of "News" objects, wich have, title, text and a image url. In the adapter i call the "setImage" method from the corresponding News object, passing the reference of the imageview in which view i want to show the image. Here is the code, responsible of getting the image and caching it:
private String image //url of the image to download
private Bitmap imagebmp; //To store the cached image
public void setImage(ImageView imgview, AQuery aq)
{
if (imagebmp==null || imagebmp.isRecycled())
{
Bitmap bm = aq.getCachedImage(image);
if (bm==null || bm.isRecycled())
aq.id(imgview).image(image);
else {
imgview.setImageBitmap(bm);
imagebmp = bm;
}
} else {
imgview.setImageBitmap(imagebmp);
}
}
Thanks!