What am I doing wrong here ? It goes into an endless loop of the BusyPage popup and disappear repeatedly.
` protected async override void OnAppearing ()
{
base.OnAppearing ();
await Navigation.PushModalAsync (new BusyPage ());
await Task.Delay (5000); // I have a call to REST web service and BindingContext = someObject, replaced with Delay(5000) - same result
await Navigation.PopModalAsync ();
}
My BusyPage looks like this
public class BusyPage : ContentPage
{
public BusyPage ()
{
BackgroundColor = Color.Transparent;
this.Content = new StackLayout {
Children = {
new Label { Text = "Loading", BackgroundColor = Color.Transparent, HorizontalOptions = LayoutOptions.Center },
new ActivityIndicator {
IsVisible = true,
IsRunning = true,
}
},
VerticalOptions = LayoutOptions.CenterAndExpand,
BackgroundColor = Color.Transparent
};
}
}
`