Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Xamarin.Forms Android NavigationPage Animation Customize
using XFANavigationSlide.Droid;
using Application = Android.App.Application;
using FragmentTransaction = Android.Support.V4.App.FragmentTransaction;
using View = Android.Views.View;
[assembly: ExportRenderer(typeof(NavigationPage), typeof(MyNavRenderer))]
namespace XFANavigationSlide.Droid
{
public class MyNavRenderer : NavigationPageRenderer
{
protected override void SetupPageTransition(FragmentTransaction transaction, bool isPush)
{
base.SetupPageTransition(transaction, isPush);
if (isPush) transaction.SetCustomAnimations(Resource.Animation.enter_from_right, Resource.Animation.exit_to_left);
else
transaction.SetCustomAnimations(Resource.Animation.enter_from_left, Resource.Animation.exit_to_right);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment