Skip to content

Conversation

@SubhikshaSf4851
Copy link
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause:

The visual separation line appears because of Android’s default elevation shadow on BottomNavigationView, which becomes visible when rendered together with transparent gradient backgrounds.

Description of Change :

Set the Elevation property to 0 in the BottomNavigationView on Android to prevent visual separation lines, especially with gradients.

Issues Fixed

Fixes #12324

Tested the behavior in the following platforms

  • Windows
  • Android
  • iOS
  • Mac

Screenshot

Before Issue Fix After Issue Fix
Screen.Recording.2025-11-05.at.10.04.49.mov
Screen.Recording.2025-11-05.at.10.01.14.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 5, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@SubhikshaSf4851! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Nov 5, 2025
@sheiksyedm
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@SubhikshaSf4851 SubhikshaSf4851 marked this pull request as ready for review November 5, 2025 09:50
Copilot AI review requested due to automatic review settings November 5, 2025 09:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a visual bug in Android TabbedPage where a separation line appears when using gradients as the bar background, particularly when tabs are positioned at the bottom. The fix sets the elevation to 0 on the BottomNavigationView to remove the visual separation line.

Key Changes

  • Added Elevation = 0 property to BottomNavigationView in TabbedPageManager.cs
  • Created UI test Issue12324 to verify the fix with gradient backgrounds
  • Added test snapshots for Android and Windows platforms

Reviewed Changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
TabbedPageManager.cs Sets elevation to 0 on BottomNavigationView to prevent visual separation lines
Issue12324.cs (HostApp) Test page demonstrating bottom-placed tabs with gradient background
Issue12324.cs (Shared.Tests) UI test verifying the visual fix works correctly
Issue12324TabbedPageVisualTest.png (Android) Baseline screenshot for Android platform
Issue12324TabbedPageVisualTest.png (Windows) Baseline screenshot for Windows platform

@@ -0,0 +1,25 @@
#if TEST_FAILS_ON_CATALYST // TabBar not visible on Catalyst: https://github.com/dotnet/maui/issues/32329
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

The test is excluded from Catalyst due to TabBar visibility issues. According to UI testing guidelines, tests should run on all applicable platforms by default unless there's a documented limitation. Since this is a TabbedPage visual test specific to Android's bottom tab placement (line 11 in HostApp), consider whether this test should also be excluded from iOS and Windows platforms, or if the platform-specific code in the HostApp (AndroidSpecific.TabbedPage.SetToolbarPlacement) makes it inherently Android-only. If it's Android-only, the Issue attribute should reflect PlatformAffected.Android which it already does, but the test conditional compilation should be more explicit about which platforms it runs on.

Copilot generated this review using guidance from repository custom instructions.
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

}
},
// Set elevation to 0 to prevent visual separation lines, especially with gradients
Elevation = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Can only set it if the Background is a GradientBrush?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have updated the changes

@sheiksyedm
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

if (_bottomNavigationView is not null && _bottomNavigationView.Elevation > 0)
{
_bottomNavigationView.Elevation = 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we store and restore the original elevation value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-tabbedpage TabbedPage community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TabbedPage Barbackground visual bug when using Linear or Radial GradientBrush

4 participants