-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frequent refresh listview..sometimes cause images flashing #189
Comments
Can you upload a video? What format of images are you showing, and are they network, or local? |
it is difficult to reproduce... the images from network. i will upload the video , when it's reproduced again.. thank you |
Can you show us a code snippet? I also wonder why only one image is affected. What kind of image is it (gif, jpeg, etc)? Is it animated? |
This happens to me as well. Here's my snippet of ImageRequest request = ImageRequestBuilder.newBuilderWithSource(Uri.parse(message.getImageUrl()))
.setPostprocessor(mTransformation)
.setResizeOptions(mResizeOptions)
.build();
DraweeController controller = Fresco.newDraweeControllerBuilder()
.setOldController(holder.imgAlbumArt.getController())
.setImageRequest(request)
.build();
holder.imgAlbumArt.setController(controller); |
lushan1314 Did you solve this problem? |
@raylee4204 - you will see this because your request includes a postprocessor, and at present postprocessed images are not stored in bitmap cache, so the postprocess step has to take place again which causes a flash. @lushan1314 - please can you answer @tyronen's latest question so that we can try to help you? |
@IanChilds Is there any future plan for postprocessed images to be stored? |
It's #14 - but I don't know when/if it will get done unfortunately. |
sorry, i was busy.I just saw your reply. @tyronen the image is jpeg. my code is simple , in the ListAdapter.getView
in my case : I want to have a possibility: maybe the bitmap cache was deleted. call notifyDataSetChanged() make it reload. But i did not understand about : the bitmap cache should not be deleted when the image is showing. finally , i found one way solve it : That is to find out the current display item view, and then change their status, avoid call setImageURI method again, because the notifyDataSetChanged () - > getView () - > setImageURI ()
|
@tyronen this image is not animated |
Can you give a uri for the image that failed please? |
you mean fresco:failureImage? |
@tyronen i just tested ,GIF are happening every time, JPEG happens by chance. |
@IanChilds in version 0.4.0, if image's format isn't a GIF, I can't find this problem. but if the image is a GIF, it's still happened. |
As @IanChilds explained, the flash may happen if you are re-setting the image to the view and the image is not found in the bitmap cache. |
ok , version 0.5.3? |
This may have been fixed now. |
楼主现在解决了吗? |
闪烁的问题,我目前测试只有gif才会有。因为gif一般是不缓存的好像。你说的问题我没遇到,看上去是一样的,如果缓存很快就满了,很容易发生这种情况。还有一种办法有点恶心了,就是你不要调用notify,可以获取listview的可见区域做修改,并尽量不修改图片。不过不知道是否适合你的情况。缓存策略的话只能自己取舍了 |
能否告知一下 你的fresco配置中setBitmapMemoryCacheParamsSupplier的参数是怎么配置的? |
楼主解决了吗,求赐教! |
你是什么�问题呢?这个问题,我试了新版本是没有问题了哦。 |
my adapter getView was simple :
frequent call the method of notifyDataSetChanged, sometimes page kept flashing...
It seems caused by frequent load(or decode) pictures.
How to avoid it ? thank you !
The text was updated successfully, but these errors were encountered: