Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Allow third party libs to display animated images correctly in view recycling scenarios #6153

Merged
merged 5 commits into from May 23, 2019

Conversation

daniel-luberda
Copy link
Contributor

@daniel-luberda daniel-luberda commented May 10, 2019

Description of Change

Background: Third party libs can now be used with Image view (after registering IImageSourceHandler)

This change won't affect standard image loading. It'll allow third party libs like FFImageLoading to display animated images correctly in view recycling scenarios. Without this, after scrolling, animated images are not shown at all (layout invalidation is not initiated).

FFImageLoading also uses this workaround: https://github.com/luberda-molinet/FFImageLoading/blob/90ed8eef65ed1c9a57a4e4ce477a98c70548de5c/source/FFImageLoading.Touch/Targets/UIImageViewTarget.cs#L50-L51

API Changes

None

Platforms Affected

  • iOS

MacOS

BTW: I also tried to apply similar fix for MacOS but ImageRenderer doesn't use NSImageView at all (which supports animations). What's the reason of using NSView instead of using NSImageView?

@daniel-luberda daniel-luberda changed the title 4.0.0 allow third party libs to display animated images correctly in view recycling scenarios May 10, 2019
@daniel-luberda daniel-luberda changed the title allow third party libs to display animated images correctly in view recycling scenarios Allow third party libs to display animated images correctly in view recycling scenarios May 10, 2019
@samhouts samhouts added this to In Review in v4.0.0 May 10, 2019
@rmarinho
Copy link
Member

@daniel-luberda thanks, do you think you can provide an example , maybe a test project with ffimageloading we can update with this package and test?

Thanks

@daniel-luberda
Copy link
Contributor Author

daniel-luberda commented May 17, 2019

@rmarinho It's here: https://github.com/daniel-luberda/XF-PR6153 (just scroll inside list)

@rmarinho
Copy link
Member

Failing ios test nto related, tested the project provided with fix and works.

@rmarinho rmarinho merged commit b029f47 into xamarin:4.0.0 May 23, 2019
v4.0.0 automation moved this from In Review to Done May 23, 2019
rmarinho added a commit that referenced this pull request May 23, 2019
@samhouts samhouts added this to the 4.0.0 milestone May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
v4.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants