BusyIndicator stops Animation assigning a large number of records to ListView

Hi,

BusyIndicator stops Animation. when I assign a large number of records to ListView.ItemsSource

Regards
Helmut

4 Replies 1 reply marked as answer

CS Chandrasekar Sampathkumar Syncfusion Team June 25, 2020 04:49 PM UTC

Hi Helmut, 
Thank you for using Syncfusion products. 
We have checked the reported query “BusyIndicator stops Animation assigning a large number of records to ListView” from our end. Based on the information we are clear with your requirement. Could you please share the following details which would be helpful for us to check on it and provide you solution at the earliest, 
  • Specific platform the reported issue reproduced
  • Xamarin.forms version and Syncfusion version used in your application
  • Replication procedure to reproduce the issue
  • Issue replicating video if possible
  • How BusyIndicator is used with SfListView
Regards, 
Chandrasekar Sampathkumar 



HL Helmut Lubik June 26, 2020 10:29 AM UTC

Hi Chandrasekar,

Xamarin.Forms: v4.6.0.967
Syncfusion Controls: v18.1.0.52 - 18.1.0.59

This was working fine in the past (over 1 Year).

Thanks and best regards.

My XAML CODE Modified to relevant parts:

ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:convert="clr-namespace:Praxis2Go.Converters;assembly=Praxis2Go"
             xmlns:sync="clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms"
             xmlns:data="clr-namespace:Syncfusion.DataSource;assembly=Syncfusion.DataSource.Portable"
             xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
             ios:Page.UseSafeArea="true"
             xmlns:busyindicator="clr-namespace:Syncfusion.SfBusyIndicator.XForms;assembly=Syncfusion.SfBusyIndicator.XForms"
             x:Class="MyApp.MainPage" >
    
    <ContentPage.Resources>
        <ResourceDictionary>
            <Style x:Key="BusyIndicatorStyle" TargetType="busyindicator:SfBusyIndicator">
                <Setter Property="TextColor" Value="LightGray" />
                <Setter Property="ViewBoxHeight" Value="{OnPlatform iOS=150, Android=100, UWP=200, Default=150}" />
                <Setter Property="ViewBoxWidth" Value="{OnPlatform iOS=150, Android=100, UWP=200, Default=150}" />
            </Style>
        </ResourceDictionary>
    </ContentPage.Resources>

    <ContentPage.Content>
        <Grid>                       
            <sync:SfListView x:Name="ListViewCard" Padding="5,0,5,0" Margin="0"
                             VerticalOptions="FillAndExpand"
                             IsStickyGroupHeader="True"
                             AllowSwiping="True"
                             AllowGroupExpandCollapse="True"
                             SelectionMode="Single"
                             SelectionChanged="ListView_OnSelectionChanged"
                             ItemHolding="ListView_OnItemHolding"
                             AutoFitMode="Height"
                             ItemSize="{OnPlatform iOS=100, Android=150, UWP=130}"
                             ItemSpacing="2"
                             >
                <sync:SfListView.ItemTemplate>
                    <DataTemplate>
                        <Grid BackgroundColor="{Binding .,Converter={StaticResource IndexToColorConverter},ConverterParameter={x:Reference Name=ListViewCard}}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="2" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="{OnIdiom Phone=30, Tablet=50, Desktop=40}" />
                                <ColumnDefinition Width="{OnIdiom Phone=20, Tablet=40, Desktop=30}" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="24" />
                            </Grid.ColumnDefinitions>
                            <Label Grid.Row="0" Grid.Column="0" Text="{Binding B1}" />
                            <Label Grid.Row="0" Grid.Column="1" Text="{Binding B2}" />
                            <Label Grid.Row="0" Grid.Column="2" Text="{Binding B3}" />
                            <Button Grid.Row="0" Grid.RowSpan="2" Grid.Column="3" VerticalOptions="Center" HorizontalOptions="Center" Text="&#xf1b8;" FontFamily="{StaticResource FontAwesomeRegular}" FontSize="Small" />
                            <BoxView Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" BackgroundColor="LightGray" />
                        </Grid>
                    </DataTemplate>
                </sync:SfListView.ItemTemplate>

                <sync:SfListView.GroupHeaderTemplate> 
                    <DataTemplate> 
                        <StackLayout BackgroundColor="#E4E4E4" Margin="0"> 
                            <Label x:Name="LabelGroup" Text="{Binding Key}"
                                   FontSize="14"
                                   FontAttributes="Bold"
                                   TextColor="DimGray"
                                   VerticalOptions="Center"
                                   HorizontalOptions="Start"
                                   Margin="5" />
                        </StackLayout> 
                    </DataTemplate> 
                </sync:SfListView.GroupHeaderTemplate> 
            </sync:SfListView>

            <busyindicator:SfBusyIndicator x:Name="Busyindicator" AnimationType="Cupertino"  Style="{StaticResource BusyIndicatorStyle}"  />

        </Grid>
    </ContentPage.Content>
</ContentPage>

AND THE CODE BEHIND:

protected override async void OnAppearing()
{
    base.OnAppearing();
    try
    {
    Busyindicator.IsEnabled = true; // START ANIMATION
        App.Liste = await App.DataBase.GetxxxListe(); // ANIMATION IS STILL RUNNING

        ListViewCard.ItemsSource = App.Liste; // ANIMATION STOPS UNTIL ALL DATA ARE ASSIGNED
    Busyindicator.IsEnabled = false;
}
    catch (Exception ex)
    {
        System.Diagnostics.Debug.WriteLine(ex.Message);
    }
}


HL Helmut Lubik June 26, 2020 10:31 AM UTC

Sorry, forgot it

Platform is iOS


LN Lakshmi Natarajan Syncfusion Team June 29, 2020 10:46 AM UTC

Hi Helmut, 
 
Thank you for the update. 
 
We have checked the reported query “BusyIndicator stops Animation assigning a large number of records to ListView” from our end. We would like to inform you that the SfBusyIndicator animation will be stopped if we set the IsEnabled property. Also, you can overcome this scenario by handling the IsVisible property of the SfBusyIndicator. Please refer the following code snippets for more reference, 
 
Code behind: 
protected override async void OnAppearing() 
{ 
    base.OnAppearing(); 
    try 
    { 
                Busyindicator.IsEnabled = true;           // START ANIMATION 
                 App.Liste = await App.DataBase.GetxxxListe(); // ANIMATION IS STILL RUNNING 
 
                 ListViewCard.ItemsSource = App.Liste; // ANIMATION STOPS UNTIL ALL DATA ARE ASSIGNED 
                Busyindicator.IsEnabled = false; 
                Busyindicator.IsVisible = false; 
    } 
    catch (Exception ex) 
    { 
        System.Diagnostics.Debug.WriteLine(ex.Message); 
    } 
} 
 
We have checked the same scenario in our simple sample and attached the tested sample in the following link, 
 
Please check the sample and let us know if you still facing the same issue? If not please revert us back with the modified sample to reproduce the issue. It will be helpful for us to check on it and provide you the solution as soon as possible. 
 
Regards, 
Lakshmi Natarajan 
 


Marked as answer
Loader.
Up arrow icon