[BUG] Back to page animation does not work in XF 5.0.0.2196.
See original GitHub issueHi everyone, today I upgraded XF to version 5.0.0.2196 and unfortunately the site animation does not work as before. Next page animation works well but back animation doesn’t. I used to use XF version 5.0.0.2012 and everything worked fine. I enclose a few screenshots. Thanks a lot.
Bug Information
Version Number of Plugin: 2.4.0 Device Tested On: Realme GT Android 11, OnePlus 9 Pro Android 11. Tested on other devices with the same effect Simulator Tested On: Pixel3_XL_API_30 Version of VS: 16.11.5 Version of Xamarin: 5.0.0.2196 Versions of other things you are using: Xamarin.Essentials 1.7.0
Steps to reproduce the Behavior
Just create a new Xamarin Forms project and upgrade XF to the latest build 5.0.0.2196. That is all. You don’t have to add anything else. He tried it in XF.Shell and in a blank window. Same mistake.
Expected Behavior
The animation back to the page should work as in the previous version of XF 5.0.0.2012. see video XF_5.0.0.2012.
Actual Behavior
The back to page animation does not work. see video XF_5.0.0.2196.
Code snippet
in XAML
NavigationPage.HasNavigationBar="False" NavigationPage.HasBackButton="False" sharedTransitions:SharedTransitionNavigationPage.TransitionDuration="300" sharedTransitions:SharedTransitionNavigationPage.BackgroundAnimation="SlideFromRight"
in App.cs
MainPage = new SharedTransitionNavigationPage(new Page1());
Navigate to the page
App.Current.MainPage.Navigation.PushAsync(new Page2());
Navigate back to the page
App.Current.MainPage.Navigation.PopAsync();
Screenshots
https://user-images.githubusercontent.com/5471789/141354257-932f97a3-a8e5-468d-baea-2e34f6e59cb7.mp4
https://user-images.githubusercontent.com/5471789/141354325-9c92df2c-f23a-4672-a214-4a2fdf25a619.mp4
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
Unfortunately the latest versions of xf modified a lot of things in navigations. for example the
NavigationaPage
(and i suspectShell
too)) in Android is completely broken for this plugin. The problem is that the fragments generation in the destination page now happens too late to attach a shared transition inside the available overrides provided by XF, there is no fix for that oter than rewrite all the platform navigation logic (not going to happen).Also something is changed in the iOS navigation that broke the back button.
I spent a few hours trying to fix those issue but the Android one hit me hard, is unfixable 😦
So i cannot be able to support this for XForms 5 anymore (the first version of XF5 should still work) and i’m going full in with MAUI with a full rewrite.
MAUI handlers are way more flexibile and expandable than XF renderers.
I think that this plugin was too “hacky” for XF and too suscetible at every minor changes made by the XF team in the navigation logic, incapsulated in renderers with very few entry point available to extend.
I have some nice idea for MAUI, i want to be able to make shared transition on grouped view more easily and semplify by A LOT all the source code, expecially the iOS one (where there are not OS support for shared transitions and i had to do some crazy things to emulate them).
Yes, it seems that this project will be unusable in the future. Therefore, I applied for the inclusion of this project in the XamarinCommunityToolkit. It would be great to have this option with a box with additional features in one XCT project.