Forum Xamarin Xamarin.Android

OnAppearing of all pages in navigation stack gets called after resuming app

Hi!

When my app is resumed, the method OnAppearing is called from all pages within the navigation stack. A further problem is, that OnAppearing then is not called after popping a page (maybe because it's already called?!). I would expect that OnAppearing is only called for the last page on the stack, which is visible to the user. Is It possible to prevent this behavior?

Thank you!

Posts

  • StarclusterStarcluster Member ✭✭
    edited November 2018

    There is a workaround by putting

    using Xamarin.Forms.PlatformConfiguration.AndroidSpecific.AppCompat;
    ...
    this.On<Xamarin.Forms.PlatformConfiguration.Android>().SendAppearingEventOnResume(false);
    this.On<Xamarin.Forms.PlatformConfiguration.Android>().SendDisappearingEventOnPause(false);
    

    in App.xaml.cs.

    see: https://bugzilla.xamarin.com/show_bug.cgi?id=52318

Sign In or Register to comment.