I'm using UniversalImageLoader (https://github.com/nostra13/Android-Universal-Image-Loader) I experience the following bug: I'm using a ListView of ImageView and each ImageView has a different height, So in the list adapter I'm changing the layout height and width on the BindView method:

LayoutParams lp = new LayoutParams(newWidth,newHeight);
holder.getPostMainPhoto().setLayoutParams(lp); 

The problem is that occasionally the image become blurry. When I scroll up or down couple of times it goes back to be normal but then again become blurry.

When I use fixed height and width (i.e. I don't change the ImageView layout) the problem do not happen.

Can you help me with this?

有帮助吗?

解决方案

Call ImageLoader inside of imageView.post(new Runnable() { ... })

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top