Coder Social home page Coder Social logo

Comments (13)

molinch avatar molinch commented on August 20, 2024

Weird I never experienced this bug.
Could you give some more hints about your device and how you use the lib maybe?
Also if you manage to upload a repro sample somewhere that would greatly help

from ffimageloading.

robbederks avatar robbederks commented on August 20, 2024

Maybe this is related with our caching issue from my previous issue report. I'll fork the repo and try to add the caching key parameter. If the issue is fixed, I'll let you know.

from ffimageloading.

molinch avatar molinch commented on August 20, 2024

If you make any progress on that I would be very happy to integrate it 😃

from ffimageloading.

mgorbach avatar mgorbach commented on August 20, 2024

I'm experiencing the same problem as well.

from ffimageloading.

molinch avatar molinch commented on August 20, 2024

Can you please write which Android version & which Xamarin.Android you use?
Also any additional info like a reproducible sample will help to debug this.

from ffimageloading.

mgorbach avatar mgorbach commented on August 20, 2024

Here's my code:

                if (imageLoadingWork != null)
                {
                    imageLoadingWork.Cancel();
                    imageLoadingWork = null;
                }

later ...

                        if (imageUrl != null)
                        {
                            if (shownImageUrl == imageUrl)
                            {
                                // Nothing to do here, we are already showing the correct image
                                ContentImageView.Alpha = 1.0f;
                            }
                            else
                            {
                                // Clear the image and start loading the next one
                                ContentImageView.Image = null;
                                ContentImageView.Alpha = 0.0f;

                                var urlString = imageUrl.ToString();
                                imageLoadingWork = ImageService.LoadUrl(urlString).Finish(work =>
                                    {
                                        if (work.Completed)
                                        {
                                            shownImageUrl = imageUrl;
                                            UIView.AnimateNotify(
                                                AnimationDuration, 
                                                0.0f, 
                                                UIViewAnimationOptions.CurveEaseInOut,
                                                () =>
                                                {
                                                    ContentImageView.Alpha = 1.0f;
                                                }, 
                                                null);
                                        }
                                        else if (work.IsCancelled)
                                        {
                                            // Nothing to do here.
                                        }
                                        else
                                        {
                                            // There seems to be a third case here that indicates successful image loading. Handle it as such.
                                            shownImageUrl = imageUrl;
                                            ContentImageView.Alpha = 1.0f;
                                        }
                                    }).Error(e => Console.WriteLine("Failed to load image: " + urlString + " error: " + e))
                                    .Into(ContentImageView);
                            }
                        }

from ffimageloading.

molinch avatar molinch commented on August 20, 2024

Thanks for the code. If you are able to upload somewhere, or email, the whole sample that would greatly help.

Which Android version & Xamarin.Android please?

from ffimageloading.

mgorbach avatar mgorbach commented on August 20, 2024

This is Xamarin.iOS, iOS 8.4, FFImageLoading 1.1.3, Xamarin.iOS 8.10.1 Business Edition

from ffimageloading.

mgorbach avatar mgorbach commented on August 20, 2024

I don't have an isolated sample I can share right now but I'll try to work one up when I have some free time.

from ffimageloading.

molinch avatar molinch commented on August 20, 2024

Can you send the stacktrace too please?

from ffimageloading.

molinch avatar molinch commented on August 20, 2024

Could you tell me if df06d7f fixes your issue?

from ffimageloading.

molinch avatar molinch commented on August 20, 2024

If you give us some feedback on this so we can deliver a new Nuget package.
Thanks!

from ffimageloading.

molinch avatar molinch commented on August 20, 2024

Fixed and a new Nuget package has been pushed.

from ffimageloading.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.