Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public static void UpdateIsVisible(this AToolbar nativeToolbar, Toolbar toolbar)
}

nativeToolbar.LayoutParameters = lp;
AndroidX.Core.View.ViewCompat.RequestApplyInsets(nativeToolbar);
}

public static void UpdateTitleIcon(this AToolbar nativeToolbar, Toolbar toolbar)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue33340.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;
using TabbedPage = Microsoft.Maui.Controls.TabbedPage;

namespace Maui.Controls.Sample.Issues;

[Issue(IssueTracker.Github, 33340, "NavigationBar overlaps StatusBar in TabbedPage", PlatformAffected.Android)]
public class Issue33340 : TabbedPage
{
public Issue33340()
{
this.On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetToolbarPlacement(ToolbarPlacement.Bottom);
var page1 = new ContentPage { Title = "Page1", Content = new Label { Text = "Page 1" } };
NavigationPage.SetHasNavigationBar(page1, false);
Children.Add(new NavigationPage(page1) { Title = "Tab1" });

var page2 = new ContentPage { Title = "Page2", Content = new Label { Text = "Page 2" } };
NavigationPage.SetHasNavigationBar(page2, false);
Children.Add(new NavigationPage(page2) { Title = "Tab2" });

var page3 = new ContentPage { Title = "Page3", Content = new Label { Text = "Page 3" } };
NavigationPage.SetHasNavigationBar(page3, false);
Children.Add(new NavigationPage(page3) { Title = "Tab3" });

var page4 = new ContentPage { Title = "Page4", Content = new Label { Text = "Page 4 with NavigationBar" } };
NavigationPage.SetHasNavigationBar(page4, true);
Children.Add(new NavigationPage(page4) { Title = "Tab4" });
Comment on lines +14 to +26
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UI test is missing AutomationId attributes on the tab buttons in the HostApp code. The test tries to interact with "Tab4" using App.WaitForElement("Tab4") and App.Tap("Tab4"), but the HostApp code does not set any AutomationId properties. While the tab Title is "Tab4", relying on Title text for UI automation is fragile and may not work reliably across platforms. Add AutomationId properties to the NavigationPage instances to ensure the test can reliably locate and interact with the tabs.

Copilot generated this review using guidance from repository custom instructions.

CurrentPage = Children[0];
}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues;

public class Issue33340 : _IssuesUITest
{
public Issue33340(TestDevice testDevice) : base(testDevice)
{
}

public override string Issue => "NavigationBar overlaps StatusBar in TabbedPage";

[Test]
[Category(UITestCategories.TabbedPage)]
public void NavigationBarLayoutWithMixedHasNavigationBar()
{
App.WaitForElement("Tab4");
App.Tap("Tab4");
VerifyScreenshot();
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading