Bug 36598 - SetHasNavigationBar screen height wrong
Summary: SetHasNavigationBar screen height wrong
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.3.5
Hardware: Macintosh Mac OS
: High normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-12-04 14:22 UTC by Momm
Modified: 2017-12-20 00:08 UTC (History)
8 users (show)

Tags: ac, navigationbar, layout, tabbedpage
Is this bug a regression?: ---
Last known good build:


Attachments
Project (254.51 KB, application/zip)
2015-12-04 14:22 UTC, Momm
Details
Sample showing issue (231.28 KB, application/zip)
2017-07-19 20:50 UTC, Paul Brenner
Details


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 ANSWERED

Description Momm 2015-12-04 14:22:58 UTC
Created attachment 14126 [details]
Project

Considering I'm in one page with a NavBar and ScrollView with 1 button and 30 labels. And I touch the button to open another page without NavBar. When I touch BACK, it comes back to the former page, but the bottom labels (28...) doesn't show.

Apparently it considers that we still don't have the NavBar and calculates the screen height wrong.

If I force "NavigationPage.SetHasNavigationBar(this, true);" in the first screen (OnAppearing method), it still doesn't work, but if I call " NavigationPage.SetHasNavigationBar(this, false);" and then "NavigationPage.SetHasNavigationBar(this, true);", it works.

I believe that Xamarin.Forms isn't considering that this value changed and for this reason, it doesn't recalculate the screen height. If I force the value to change (to false, and then true), the value changed is called and it works.

Issue happens only on iOS and I was able to reproduce in all versions (2.0, 1.5.2 and 1.3.5).
Comment 1 Momm 2015-12-15 13:15:03 UTC
BTW, if I use the workaround approach (set to false, then true), it works fine on iOS8+, but on Phones iOS 7.1.2 it hides the NavBar and then shows it very fast. On iOS8, this behaviour can't be noticed by the user.
Comment 2 Momm 2016-02-22 12:16:55 UTC
When do you intend to fix it?
Comment 3 Momm 2016-04-06 13:48:12 UTC
Hi, any news about it?
Comment 4 Chris King 2016-04-13 20:18:35 UTC
We confirmed the issue and are working through our lengthy backlog. We haven't lost track of this issue! Thanks for reporting it.
Comment 5 Paul Brenner 2017-07-19 20:23:44 UTC
Can this please be given higher priority?
Comment 6 Paul Brenner 2017-07-19 20:50:14 UTC
Created attachment 23669 [details]
Sample showing issue
Comment 7 Paul Brenner 2017-07-19 20:53:13 UTC
Added a more up to date sample.

When you push to a different page, and go back, you can see that the height is calculated wrong, because the last image on that page is now under the tabbar.

If you add the workaround, when you pop the page, the first page's content animates when it corrects it self, and doesn't look professional. 

Broken on 2.3.246, 2.3.5.256-pre6, and latest nightly 2.3.6.120
Comment 8 David Ortinau [MSFT] 2017-08-08 13:44:14 UTC
I cannot confirm the initial report as it's working fine and I don't have iOS 7. It also sounds like another issue we fixed.

Paul's report can be reproduced. To reiterate, the issue isn't apparent at the NavigationBar, but the TabBar.
Comment 9 David Ortinau [MSFT] 2017-12-20 00:08:42 UTC
Migrated to https://github.com/xamarin/Xamarin.Forms/issues/1426

Please subscribe to that issue for future updates.