Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

[2.0.0.6482] [BUG] [Android] RemovePage() and then pressing back == broken page.

$
0
0

I've got this bizarre behavior that appears to only be happening on Android.

Given the following block, if I'm asking my navigation to Replace the current page, I push the new page (viewing the pretty animation) and then remove the page directly behind it.

[Page A] -> [Page B] -> [Page C]

var animated = true;
await Navigation.PushAsync(pageC, animated);

if (navigationBehavior == NavigationBehavior.ReplaceCurrent)
{
    var stack = Navigation.NavigationStack;
    var pageToRemove = stack.Reverse().Skip(1).Take(1).FirstOrDefault();
    if (pageToRemove != null)
    {
        // Removes Page B
        Navigation.RemovePage(pageToRemove);
    }
}

This works as expected on iOS, however on Android, once the new page is pushed, and I press the back button to navigate up the stack (To Page A), all of the content on page A is blank except for the ToolbarItems.

Is this something I'm doing incorrectly, or do we think this might be a bug?


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>