FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

want to show a loader in LoadingPlaceHolder and not image

Open Monikaprime opened this issue 6 years ago • 2 comments

want to show a loader in LoadingPlaceHolder and not image Like a activity Indicator and not some fix image, Have tried to use gif but it is not working 2109

this type of effect is coming it is not moving

Monikaprime avatar Sep 21 '19 05:09 Monikaprime

I might have the same issue. I am using a gif as a placeholder, more like a skeleton loading effect. The gif's dimensions are quite small 150x100 and the size is 100KB. In iOS it seems to be working fine. In Android the gif is not animating and the image to be loaded is never showing. I am just left with a none animating gif. Also in the Success handler I get a LoadingResult of CompiledResource.

I have those packages installed in all three of my projects

<PackageReference Include="Xamarin.FFImageLoading" Version="2.4.11.982" />
<PackageReference Include="Xamarin.FFImageLoading.Forms" Version="2.4.11.982" />
<PackageReference Include="Xamarin.FFImageLoading.Transformations" Version="2.4.11.982" />

Thanks for the great library and your efforts.

xerx avatar May 16 '20 20:05 xerx

You can try adding an ActivityIndicator while checking if the image has finished loading using DataTrigger and Binding For example:

                                         <StackLayout Margin="8,0">
                                                    <ActivityIndicator Color="Red">
                                                        <ActivityIndicator.Triggers>
                                                            <DataTrigger TargetType="ActivityIndicator" Binding="{Binding Source={x:Reference image}, Path=IsLoading}" Value="True">
                                                                <Setter Property="IsRunning" Value="True"></Setter>
                                                                <Setter Property="IsVisible" Value="True"></Setter>
                                                            </DataTrigger>

                                                            <DataTrigger TargetType="ActivityIndicator" Binding="{Binding Source={x:Reference image}, Path=IsLoading}" Value="False">
                                                                <Setter Property="IsRunning" Value="False"></Setter>
                                                                <Setter Property="IsVisible" Value="False"></Setter>
                                                            </DataTrigger>
                                                        </ActivityIndicator.Triggers>
                                                    </ActivityIndicator>

                                                    
                                                        <forms:CachedImage FadeAnimationForCachedImages="True"  BitmapOptimizations="True" Source="{Binding Path}" DownsampleToViewSize="True" Aspect="Fill" HeightRequest="225" WidthRequest="145" x:Name="image">
                                                        </forms:CachedImage>
                                                </StackLayout>

ramidisha avatar Feb 10 '21 14:02 ramidisha