FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

Android: MvxCachedImageView OnFinish, OnSuccess events are getting called only once

Open gopal-patil opened this issue 3 years ago • 0 comments

🐛 Bug Report

I am subscribing to events OnFinish and OnSuccess for work need to be done after image download gets completed. This is working as expected in iOS but in Android this events called only once, if I reopen the same Fragment second time this events are not trigged. There is no issue with the image loading it working fine.

Here is my implementation

XML Binding <ffimageloading.cross.MvxCachedImageView android:id="@+id/heroImageID" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" android:layout_alignParentTop="true" android:fitsSystemWindows="true" local:layout_collapseMode="parallax" local:MvxBind="ErrorPlaceholderImagePath 'res:error_place_holder.jpg'; ImagePath _genericView.ImageUrl, Converter=ImageUrl" />

Event Handling FFImageLoading.Cross.MvxCachedImageView heroImage = (FFImageLoading.Cross.MvxCachedImageView)thisView.FindViewById(Resource.Id.heroImageID); heroImage.OnFinish += (obj, e) => { Console.WriteLine("HeroImage_OnFinish"); }; heroImage.OnSuccess += (obj, e) => { Console.WriteLine("HeroImage_OnSuccess"); };

Expected behavior

OnFinish, OnSuccess get called every time.

Reproduction steps

  1. Click on Nth list item, detail page get open and OnFinish, OnSuccess called successfully
  2. Press soft/device back button and return to list.
  3. Click on the same Nth item , detail page get open and OnFinish, OnSuccess not get called.

Configuration

Xamarin.Android Xamarin.FFImageLoading 2.4.11.982

Version: 2.4.11.982

Platform:

  • [ ] :iphone: iOS
  • [x] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [ ] :monkey: Xamarin.Forms

gopal-patil avatar May 24 '21 12:05 gopal-patil