SfListView Swipe Performance Issue on iOS

Hi All,

I'm using SfListView Swipe Gesture in Xamarin Forms Project. The swipe gesture performance is smooth on Android, but it's not on iOS.
Does the bug only happen on iOS? and what to do for the performance issues?

Thanks,
Rewaldy

3 Replies

DB Dinesh Babu Yadav Syncfusion Team January 26, 2018 05:37 AM UTC

Hi Rewaldy, 
 
Sorry for the inconvenience. 
 
We have analyzed the swiping performance of SfListView in iOS platform with different pages and layouts in all possible scenarios but we could not any find performance lagging while swiping the items in both simulator and physical devices as reported.  
 
So, could you please share the below details which would help us to analyze the reported requirement better and update you an appropriate solution. 
 
  • Share the view loaded in the swipe template and item template properties?
  • Whether the issue replicates only in particular devices? If yes, please share the device configurations.
  • Whether the performance lagging reproduces only in particular pages or layouts?
  • Have you adapted the template selector concept in the swipe templates in your application?
  • If possible, please replicate the issue in a sample and revert us with the replication procedure or in a video link.
 
Please let us know if you require further assistance. 
 
Dinesh Babu Yadav 
 



RE Rewaldy January 29, 2018 09:40 AM UTC

Hi Dinesh,

  • Share the view loaded in the swipe template and item template properties?
          Swipe Template:
          <DataTemplate x:Name="RightSwipeTemplate">
                <Grid ColumnSpacing="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <StackLayout BackgroundColor="#F9E1B8" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Grid.Column="0">
                        <Image HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" BackgroundColor="Transparent" Source="{StaticResource ImgCall}" HeightRequest="25" WidthRequest="25" BindingContextChanged="callImageContextChanged" />
                    </StackLayout>
                    <StackLayout BackgroundColor="#C36418" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Grid.Column="1">
                        <Image HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" BackgroundColor="Transparent" Source="{StaticResource ImgCalender}" HeightRequest="25" WidthRequest="25" BindingContextChanged="calenderImageContextChanged" />
                    </StackLayout>
                    <StackLayout BackgroundColor="#D31145" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Grid.Column="2">
                        <Image HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" BackgroundColor="Transparent" Source="{StaticResource ImgDelete}" HeightRequest="25" WidthRequest="25" BindingContextChanged="deleteImageContextChanged" />
                    </StackLayout>
                </Grid>

          Item Template:
          listView.ItemTemplate = new DataTemplate(() =>
            {
                var grid = new Grid();
                grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
                grid.BackgroundColor = Color.White;
                grid.RowSpacing = 0;
                var card = new StackLayout
                {
                    BackgroundColor = Color.White,
                    Margin = new Thickness(01400),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions = LayoutOptions.FillAndExpand,
                    Orientation = StackOrientation.Horizontal,
                };

                var icon = new Image
                {
                    HorizontalOptions = LayoutOptions.Start,
                    HeightRequest = 40,
                    WidthRequest = 40,
                    Margin = new Thickness(10555),
                    VerticalOptions = LayoutOptions.Center,
                    Aspect = Aspect.AspectFit,
                    Source = msDeviceSetting.Image,
                };

                var description = new Label
                {
                    FontFamily = Fonts.DIN,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    //VerticalOptions = LayoutOptions.FillAndExpand,
                    HeightRequest = 50,
                    FontSize = Device.GetNamedSize(NamedSize.Defaulttypeof(Label)),
                    Margin = new Thickness(5050),
                };
                description.SetBinding(Label.TextProperty"message");
                description.SetBinding(Label.FontAttributesProperty"isRead"converternew FontAttributesConverter());

                var time = new Label
                {
                    FontFamily = Fonts.DIN,
                    HorizontalOptions = LayoutOptions.StartAndExpand,
                    VerticalOptions = LayoutOptions.Start,
                    Margin = new Thickness(5053),
                    FontSize = Device.GetNamedSize(NamedSize.Microtypeof(Label)),
                };
                time.SetBinding(Label.TextProperty"timestamp_formatted");

                var line = new StackLayout
                {
                    BackgroundColor = Color.Black,
                    HeightRequest = 0.5,
                    Margin = new Thickness(5000),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                };

                var contentLayout = new StackLayout
                {
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    Orientation = StackOrientation.Vertical,
                    VerticalOptions = LayoutOptions.FillAndExpand,
                    BackgroundColor = Color.White,
                    Spacing = 0,
                };

                var additional = new Label
                {
                    FontFamily = Fonts.DIN,
                    HorizontalOptions = LayoutOptions.StartAndExpand,
                    VerticalOptions = LayoutOptions.Start,
                    FontSize = Device.GetNamedSize(NamedSize.Smalltypeof(Label)),
                    IsVisible = false,
                };
                additional.SetBinding(Label.TextProperty"Id");

                contentLayout.Children.Add(description);
                contentLayout.Children.Add(time);
                contentLayout.Children.Add(line);

                card.Children.Add(icon);
                card.Children.Add(contentLayout);

                grid.Children.Add(card00);

                return grid;
            });
  

  • Whether the issue replicates only in particular devices? If yes, please share the device configurations.
          Only happens on iPhone

  • Whether the performance lagging reproduces only in particular pages or layouts?
          Because there's only one layout that implement the swipe, so it only happens on the layout.

  • Have you adapted the template selector concept in the swipe templates in your application?
          I don't know how to use it.

  • If possible, please replicate the issue in a sample and revert us with the replication procedure or in a video link.
          I'm trying to replicate the issue now.

Thanks,
Rewaldy


DB Dinesh Babu Yadav Syncfusion Team January 30, 2018 01:16 PM UTC

Hi Rewaldy, 
 
Sorry for the inconvenience. 
 
Based on the given information, we have prepared the sample to replicate the reported issue at our end and ensured in the below device configurations in iOS platform. In the sample, we have loaded the similar template in the swipe templates and noted the noticeable swiping performance when left and right swipe action is performed which has been recorded and attached in the below video link and did not find any performance degradation as reported.  
 
For your reference, we have attached the ensured sample at our end and you can download it from the below link.  
 
 
 
Device Configurations: 
 
Device Model: IPad – MP2F2HN/A 
OS Version:  10.3.2 
 
Device Model: IPod – MKH62BT/A 
OS Version:  10.1.1 
 
Device Model: IPhone 5 – MF323HN/A 
OS Version:  10.3.3 
 
Also, could you please share the below details which would help us to analyze the issue better and update you an appropriate solution. 
 
  • Whether issue replicates only in particular IPhone Model or in particular OS version? If yes, please share the OS version and Model configuration details.
  • Share the Parent View in which the SfListView is loaded i.e., StackLayout or Grid etc., ?
  • Share the Page in which SfListView is loaded i.e., ContentPage, ContentView, MasterDetailPage or CarouselPage etc.,?
  • If possible please replicate the issue by modifying the above sample and revert us with the replication procedure to analyze the issue better.
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 
 


Loader.
Up arrow icon