FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

Images disappear on collectionview scroll Xamarin Forms

Open SagarPanwala opened this issue 6 years ago • 8 comments

Description

  • I implemeneted experimental collectionview with Xamarin Forms 4.0, images are loading when app launched but after we scroll images are getting disappeared. I'm not sure this is the issue of CollectionView or FFImageLoading , so posting in both github Repo To Track : https://github.com/xamarin/Xamarin.Forms/issues/6341

Steps to Reproduce

  • On scroll of collectionview(Xamarin forms 4.0) images getting disappeared in iOS, Android works fine.

Expected Behavior

  • Images should not get disappeared.

Actual Behavior

  • On scroll of collectionview(Xamarin forms 4.0) images getting disappeared in iOS, Android works fine.

Basic Information

  • Version with issue: Current Latest version
  • Last known good version: never tried with collectionview before
  • Platform: iOS

Reproduction Link / Code

Here is the code

       <CollectionView
                ItemsLayout="{x:Static ListItemsLayout.HorizontalList}"
                ItemSizingStrategy="MeasureFirstItem"
                ItemsSource="{Binding FavouriteRecipes}"
                HeightRequest="220">       
         <CollectionView.ItemTemplate>
                    <DataTemplate>
                        <Grid
                            Padding="5,2"
                            WidthRequest="140">
                            <Frame
                                HasShadow="true"
                                Padding="0"
                                Margin="0"
                                IsClippedToBounds="true"
                                CornerRadius="2"
                                BackgroundColor="White">
                                <Grid
                                    Margin="0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition
                                            Height="150" />
                                        <RowDefinition
                                            Height="*" />
                                    </Grid.RowDefinitions>
                                    
                                        <ffimageloading:CachedImage
                                            Grid.Row="0"
                                            HeightRequest="150"
                                            LoadingPlaceholder="placeholder_square.png"
                                            ErrorPlaceholder="placeholder_square.png"
                                            Aspect="AspectFill"
                                            Source="{Binding Image}" />
                                    <StackLayout
                                        Grid.Row="1"
                                        Orientation="Vertical"
                                        Padding="5,0">
                                        <Label
                                            Font="14"
                                            Text="{Binding Title}"/>
                                        <StackLayout
                                            Orientation="Horizontal"
                                            HeightRequest="30">
                                            <Image
                                                Source="ic_clock_black.png"
                                                Aspect="AspectFill"
                                                WidthRequest="20"
                                                HeightRequest="20"
                                                VerticalOptions="Center"
                                                HorizontalOptions="Start" />
                                            <Label
                                                Font="13"
                                                Text="{Binding Time}"
                                                VerticalTextAlignment="Center" />
                                        </StackLayout>
                                    </StackLayout>
                                      </Grid>
                            </Frame>
                        </Grid>
                    </DataTemplate>
                </CollectionView.ItemTemplate>
            </CollectionView>

Here is the link of video https://www.dropbox.com/s/wpgxkl6prtmn0iu/collectionview%20ffimageloading%20issue.mov?dl=0

SagarPanwala avatar May 29 '19 03:05 SagarPanwala

I can confirm we are seeing the same issue with cached images in listview and flowlistview, pretty sure issue related to this Lib

LeoJHarris avatar May 29 '19 04:05 LeoJHarris

Some times they show the first time some times they don't, other times scrolling away and then back then images disappear as well

LeoJHarris avatar May 29 '19 04:05 LeoJHarris

@SagarPanwala Could you make a simple repo so I could add it to FFImageLoading project and debug it?

daniel-luberda avatar May 29 '19 08:05 daniel-luberda

@SagarPanwala we are actually facing issue on android. We havnt tested on iOS

LeoJHarris avatar May 29 '19 09:05 LeoJHarris

@daniel-luberda https://github.com/xamarin/Xamarin.Forms/issues/6341#issuecomment-503448744

dragonale avatar Jun 19 '19 15:06 dragonale

@daniel-luberda Is this an issue with FFImageLoading or Forms?

adrianknight89 avatar Jul 22 '19 00:07 adrianknight89

I am still facing this images dissapering after scroll issue. Any solution?

Hrishikesh46779 avatar Apr 20 '21 18:04 Hrishikesh46779

I faced the same issue. It doesn't seem to have been fixed yet.

nathankim0 avatar Sep 13 '21 08:09 nathankim0