You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
When a modal page is dismissed, the page being revealed doesn't seem to get OnAppearing called on Android even though it does on iOS.
Steps to Reproduce
Create a new Xamarin.Forms Blank app.
In App.xaml.cs, set the app's MainPage to be a NavigationPage containing the template MainPage class.
Create a second page with a button that calls await this.Navigation.PopModalAsync(); when clicked.
In MainPage.xaml.cs, override OnAppearing and put a breakpoint in there to monitor progress.
Run the app on Android (and optionally on iOS to compare)
Expected Behavior
The breakpoint in OnAppearing of the root page should be hit twice. Once as the page is loaded initially for the app and once when the modal page is dismissed.
Actual Behavior
On Android, OnAppearing is only called when the app loads, not when the modal page is dismissed.
On iOS, OnAppearing is called twice as expected.
Basic Information
Version with issue: v3.5.0.169047, v3.6.0.135200-pre1
Attached is a minimal repro example, but this also occurs in this Xamarin University course exercise 3 (exercise instructions), even when that app is copied into a fresh File > New Blank Xamarin.Forms solution. On Android, when you set the personalization information in the initial modal, it is not set on the root page. On iOS, it works as expected.
In the attached repro solution, after dismissing the initial modal page, you will see the difference on iOS and Android. On iOS, there will be two OnAppearing additions to the root label: one for the app loading the main page, and one for after the modal page is dismissed. On Android, though, there will only be one OnAppearing addition to the root label: one for the app loading the main page.
Confirmed this is occurring for Android in Xamarin.Forms 3.6.0.264807.
Another thing to note: If you background the app while the modal page is visible, upon foregrounding OnAppearing gets called on the root page instead of the modal page. The expected behavior here would be that OnAppearing gets called on the modal page since that is the visible/appearing page.
Description
When a modal page is dismissed, the page being revealed doesn't seem to get
OnAppearing
called on Android even though it does on iOS.Steps to Reproduce
await this.Navigation.PopModalAsync();
when clicked.OnAppearing
and put a breakpoint in there to monitor progress.Expected Behavior
The breakpoint in OnAppearing of the root page should be hit twice. Once as the page is loaded initially for the app and once when the modal page is dismissed.
Actual Behavior
On Android, OnAppearing is only called when the app loads, not when the modal page is dismissed.
On iOS, OnAppearing is called twice as expected.
Basic Information
Reproduction Link
Attached is a minimal repro example, but this also occurs in this Xamarin University course exercise 3 (exercise instructions), even when that app is copied into a fresh File > New Blank Xamarin.Forms solution. On Android, when you set the personalization information in the initial modal, it is not set on the root page. On iOS, it works as expected.
In the attached repro solution, after dismissing the initial modal page, you will see the difference on iOS and Android. On iOS, there will be two OnAppearing additions to the root label: one for the app loading the main page, and one for after the modal page is dismissed. On Android, though, there will only be one OnAppearing addition to the root label: one for the app loading the main page.
ReproModelDismissWithoutOnAppearing.zip
Screenshots
The text was updated successfully, but these errors were encountered: