Xamarin 4 Carousel view containing a List view (freezing / lagging) in the list view content render.

Using the xamrain forms core provided implementation of carouselview.
I have a carousel view that contains a grid with some data and a ListView.
when I swipe the carouselview I can see a lag freeze in the data template that the list view is trying to render.
I can only see this when deploying to an Android device. On IOS it is running really good.
Something else I am seeing on the Android device is if I go to an index in the carouselview that contains the listview it is slowly making its way to that index. IOS again runs good.

I just pulled out the xaml for the 2 views I'm talking about .

              CarouselView x:Name="name"
                            ItemsSource="{Binding source}"
                            PeekAreaInsets="{OnPlatform iOS='0,0,50,0', Android='50'}"
                            Position="{Binding Position}"
                            HeightRequest="400"
                            HorizontalOptions="Center"
                            VerticalOptions="CenterAndExpand"
                            IsScrollAnimated ="False"

             ListView x:Name="name" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="8"
                                                                           Margin="4,0,4,0"
                                                                           HorizontalOptions="CenterAndExpand"
                                                                           VerticalOptions="CenterAndExpand"
                                                                           ItemsSource="{Binding source}"
                                                                           ItemTemplate="{StaticResource tempalte}"
                                                                           CachingStrategy="RetainElement"
                                                                           SeparatorVisibility="None"
                                                                           HasUnevenRows="true"
                                                                           ItemSelected="Select" 

Thanks for any help

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    I created a simple list view in the carousel view it runs smoothly on Android:


    Can you reproduce it on a fresh sample? If so, try to post it here to help us have a test on my side.
    Moreover, the carousel view is still in preview:
    https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/carouselview/
    If you have any good suggestions to help us improve it, try to file an issue here: https://github.com/xamarin/Xamarin.Forms/issues

  • MuhiMuhi Member ✭✭

    @LandLu
    Thanks for the quick response. I can see that your posted example runs smoothly.
    I will try and come up with an example of what I'm seeing. I can't use the current app as I'm hitting backend service calls ..etc.

  • LandLuLandLu Member, Xamarin Team Xamurai

    Maybe some network issues could also cause that lag. Feel free to post your update here we will help you look into it if this issue could be reproduced on my side.

  • MuhiMuhi Member ✭✭

    @Landlu
    Yes I looked in to that I checked to see that I was working with 100% cached data.

Sign In or Register to comment.