Skip to content

[Android] fix: Navigation bar not updating after the current tab is removed. #30566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rover656
Copy link

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!

Description of Change

Makes sure that if SetupMenu opts to short-circuit when the DisplayedPage is null, we clear _menuSetup so that the menu is correctly reconfigured after a new screen takes its place.

Issues Fixed

Fixes #30565

@Copilot Copilot AI review requested due to automatic review settings July 11, 2025 08:54
@Rover656 Rover656 requested a review from a team as a code owner July 11, 2025 08:54
Copy link
Contributor

@Copilot 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 navigation bar bug where the menu/navigation bar fails to update properly after the current tab is removed in Android Shell applications. The issue occurs when DisplayedPage becomes null but the menu setup state isn't reset, preventing proper reconfiguration when a new page takes its place.

Key Changes

  • Adds state reset logic in SetupMenu() method to clear the _menuSetup flag when DisplayedPage is null
  • Ensures menu reconfiguration happens correctly after tab removal and replacement
Comments suppressed due to low confidence (1)

src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRenderer.cs:457

  • This bug fix addresses navigation bar behavior when tabs are removed, but there's no corresponding test case visible for this scenario. According to the coding guidelines, all code changes should have relevant test cases in TestCases.HostApp and TestCases.Shared.Tests to verify the navigation bar updates correctly after tab removal.
			if (DisplayedPage is null)

Copy link
Contributor

Hey there @@Rover656! 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 community ✨ Community Contribution label Jul 11, 2025
@Rover656 Rover656 changed the title fix: Navigation bar not updating after the current tab is removed. [Android] fix: Navigation bar not updating after the current tab is removed. Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] Bottom navigation bar not updating correctly
1 participant