dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.15k stars 1.74k forks source link

Implement support for custom page transition animation not Shell for Android #16353

Open Alex-Dobrynin opened 1 year ago

Alex-Dobrynin commented 1 year ago

Description

It would be great to have possibility to change default fragment transition animation as it was is xam forms navigation page renderer SetupPageTransition(). Because right now when navigating through pages and back it has very bad fade animation.

Public API Changes

For example, this is how it should be called navigate method on NavController inside StackNavigationManager

image

right now it just does like this image

Intended Use-Case

It is very useful when customer wants to animate page transitions eg. scale or translate etc.

rhaly commented 1 year ago

@Alex-Dobrynin As a workaround you can override native android resources used in maui navigation. For example nav_default_enter_anim not a great solution but it works. It will replace animation for navigation to all pages when navigating by NavigationPage.

Alex-Dobrynin commented 1 year ago

@rhaly this works only for shell navigation, but, please, read the title

rhaly commented 1 year ago

@Alex-Dobrynin It works using NavigationPage im not using Shell. See repo as an example.

https://github.com/dotnet/maui/assets/6230437/fe33bb88-fe7b-435f-a955-e3a773c1646b

orwo1 commented 8 months ago

Migrating from Xamarin.Forms with PageRenderer on Android side to support custom transition, encountered this as well. I tried overriding the 4 xml files (suggested in https://github.com/dotnet/maui/issues/16353#issuecomment-1660441130) but it's not really a solution, as it also affects our Splash Activity (as in the splash now animates into and out of the screen like a regular page). Is there a time frame to support custom transitions in Maui?