Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

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

Shell page transitions flash white on dark-themed apps because BottomNavigationView is created with hardcoded Color.WHITE in PlatformInterop.java, and navigation containers (FrameLayout, CoordinatorLayout) have no initial background. The theme-aware color only gets applied later via SetAppearance(), causing visible flash during the transition window.

Fix: Set ShellRenderer.DefaultBottomNavigationViewBackgroundColor immediately after view creation:

  • ShellItemRenderer - Apply to _bottomView and _navigationArea
  • ShellSectionRenderer - Apply to root CoordinatorLayout
  • ShellContentFragment - Apply to inflated CoordinatorLayout
var themeAwareBackgroundColor = ShellRenderer.DefaultBottomNavigationViewBackgroundColor.ToPlatform();
_bottomView.SetBackgroundColor(themeAwareBackgroundColor);
_navigationArea.SetBackgroundColor(themeAwareBackgroundColor);

DefaultBottomNavigationViewBackgroundColor returns white for light theme, #1B3147 for dark theme.

Issues Fixed

Fixes #16621

Original prompt

This section details on the original issue you should resolve

<issue_title>Shell page transition animation causes color blinking</issue_title>
<issue_description>### Description

Shell page transition causes a severe color blinking, especially for a dark themed application. It looks like the application uses default, light system theme when entering the page and then applying currently selected theme from application. See the gif below. The white blink is visible on the entire screen, furthermore the tabbar color transition from white to black is visible as well.

Occurs for both navigation invocation:

await Shell.Current.GoToAsync($"//{Routes.WelcomePage}", false);
await Shell.Current.GoToAsync($"//{Routes.WelcomePage}", true);

page_transitions

Tested on .NET: 8.0.100-preview.7.23376.3
MAUI: 8.0.0-preview.6.8686 and 8.0.0-preview.7.8842

In my opinion, expected behaviour is to either apply theme changing once it is triggered and do not invoke such color transition animations during further page transitions or add Shell navigation parameter to enable/disable the animation. Currently existed Shell.Current.GoToAsync "animate" parameter seems not to be respected at all.

Steps to Reproduce

Download the code from the public repo
Deploy onto an Android simulator and observe the problem.

Link to public reproduction project repository

https://github.com/Totalq09/MAUITabBarProblem

Version with bug

8.0.0-preview.6.8686

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Tested on Android 13 and Android 9 with the same effect

Did you find any workaround?

No, even custom ShellRenderer did not help

Relevant log output

No response

</issue_description>

Comments on the Issue (you are @copilot in this section)

@ We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our [Triage Process](https://github.com/dotnet/maui/blob/main/docs/TriageProcess.md).

Custom agent used: issue-resolver
Specialized agent for investigating and resolving community-reported .NET MAUI issues through hands-on testing and implementation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Set theme-aware background colors immediately when creating Shell fragments
and views to prevent white flash during page transitions in dark-themed apps.

The fix applies theme-aware background color to:
- BottomNavigationView (created with Color.WHITE in Java, now set to theme color)
- Navigation area FrameLayout
- ShellSection CoordinatorLayout
- ShellContent CoordinatorLayout

Uses ShellRenderer.DefaultBottomNavigationViewBackgroundColor which correctly
returns white for light theme and dark color for dark theme.

Co-authored-by: jfversluis <[email protected]>
Copilot AI changed the title [WIP] Fix shell page transition animation color blinking Fix Shell page transition color blinking on Android Dec 2, 2025
Copilot AI requested a review from jfversluis December 2, 2025 13:29
Copilot finished work on behalf of jfversluis December 2, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shell page transition animation causes color blinking

2 participants