MAUI Page transition animation background color

Igor Popov 1 Reputation point
2022-12-07T11:12:30.143+00:00

Hi everyone. I noticed that when navigating between pages in the shell, the transition animation has a background color that matches the system theme. Is it possible to override it somehow? The same problem exists in the bottom tabs when navigating. But the bottom tabs behave the same regardless of which Android system theme is selected. I'm attaching pictures and video to make it clearer what I'm talking about.

Try to watch at 0.25 or 0.5 speed.

Light android theme:
https://youtu.be/xwvUhVdkYNg

Dark android theme:
https://youtu.be/zQcuMXkCodA

268182-light-1.png
268107-light-2.png

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,583 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce Haley 95 Reputation points
    2024-05-05T19:56:19.8833333+00:00

    My workaround for this is to force a dark theme natively in the Android app. In Platforms\Android\MainApplication.cs, insert in the class constructor the line: AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightYes;

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.