Skip to content
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

Avoiding the fade in effect after a ListView is refreshed #165

Closed
a85 opened this issue Feb 4, 2013 · 10 comments
Closed

Avoiding the fade in effect after a ListView is refreshed #165

a85 opened this issue Feb 4, 2013 · 10 comments

Comments

@a85
Copy link

a85 commented Feb 4, 2013

I just started using the universal image loader library and have run into a really annoying problem. Everything loads well for the first shot but if anything changes in the data adapter the library initiates a fade in transition for every image in the list. Even though the images have been loaded already this is quite unnecessary. Is there something I am doing wrong?

The same applies for stub images. The stub image will be displayed and then the final image which creates this irritating flickering effect every time something in the list changes.

@nostra13
Copy link
Owner

nostra13 commented Feb 4, 2013

I guess getView(...) is called for every visible item after you changed adapter (you call notifyDataSetChanged(), don't you?). So .displayImage(...) is called again and so animation is applied again.

Show me your code - https://github.com/nostra13/Android-Universal-Image-Loader#user-support

@a85
Copy link
Author

a85 commented Feb 5, 2013

Yes. That is pretty much it. I am guessing you could use a tag on the ImageView to avoid this. I am using this piece of code:

options = new DisplayImageOptions.Builder()
                        .showStubImage(R.drawable.photo_loading_background)
                        .displayer(new FadeInBitmapDisplayer(150)).build();
imageLoader.displayImage(thumbUrl, holder.thumb, options);

@o-antsiferov
Copy link

I think it's related to #149 and #126

@nostra13
Copy link
Owner

nostra13 commented Feb 5, 2013

I am guessing you could use a tag on the ImageView to avoid this.

I won't use a tag of ImageView because lib's user can re-assign it,I think you should use it for your needs, UIL can't help you with your problem.

@a85
Copy link
Author

a85 commented Feb 5, 2013

Ok. Thanks for your help anyway.

@a85
Copy link
Author

a85 commented Feb 6, 2013

Just found out that even disabling the fade in effect doesn't help on older devices. Any change in the adapter makes the library load stuff again making the app unusable.

@a85 a85 closed this as completed Feb 6, 2013
@nostra13
Copy link
Owner

nostra13 commented Feb 6, 2013

Did you try to use sample app? If you think it's also unusable then I can't help you. My library work this way.

@a85
Copy link
Author

a85 commented Feb 7, 2013

Well I implemented it as per the sample code. Any way, I have forked the repo and will fix it myself when I have the time. I have reverted my code to use an earlier library. Thanks for responding to the bug report as well as the code.

@ankit422
Copy link

@a85 I'm facing the same issue, did u find any solution for this.

@MIkeeJY
Copy link

MIkeeJY commented Jun 26, 2015

what's the best solution for this problem??anyone help me plz....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants