Bug 43577 - SetHasBackButton does not update UI on Android
Summary: SetHasBackButton does not update UI on Android
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.1
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Samantha Houts [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-08-21 19:13 UTC by Alessandro
Modified: 2017-06-19 21:43 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Alessandro 2016-08-21 19:13:54 UTC
I have a Page inside a NavigationStack (not modal).
In this Page I have a Switch that (on Toggled event) call

switchHasBackButton.Toggled += (sender, e) => { 
	NavigationPage.SetHasBackButton(this, e.Value);
};


If I toggle the switch to False, the UI is not updated (I continue to see the BackButton in the NavBar), but if I press the Back button, the Page is not Popped (correctly). Tested on an API 19 android tablet

in iOS, the page is immediately updated

here a sample

https://github.com/acaliaro/TestNavigationPage
Comment 1 adrianknight89 2016-10-16 19:02:17 UTC
Can you create the exact order of steps that needs to be taken to reproduce the issue? From your description, it was unclear to me.

Also, on the GitHub page, you're getting "PushAsync is not supported globally on". This is by design. Only modal push and pop are supported by using the global `Navigation`.

For non-modal push and pop, use myNavigationPage.Navigation
Comment 2 Rui Marinho 2017-06-19 21:43:10 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!