Xamarin.forms ActivityIndicator Animation hanging issue occurred in Android when application main thread is busy. But this issue did not occur for iOS and activityIndicator animation run properly. Anyone, please let me know the cause of this in Android only.
My code like below:
XAML
<ContentPage.Content>
<StackLayout>
<Button Text="GO TO NEW PAGE" Clicked="Button_Clicked"/>
<ActivityIndicator Color="Maroon" IsRunning="true" />
</StackLayout>
</ContentPage.Content>
CS:
private void Button_Clicked(object sender, EventArgs e)
{
for (int i = 0; i < 100000; i++)
{
Console.WriteLine(i);
}
Navigation.PushAsync(new NewPage());
}
Steps to reproduce:
1)Run this code
2)Click GO TO NEW PAGE