Remove animation between SplashActivity and MainPage

MarlonRibeiroMarlonRibeiro USMember ✭✭✭

I have a Xamarin Forms project, which has a SplashScreen implemented separately on IOS and Android. When the SplashActivity finish, my MainPage is loaded with an animation.
I'm not sure if the animation is between SplashAcitivity and MainActivity on Android, or if it's between MainActivity (on Android) and MainPage (PCL), in the LoadApplication method. The animation only occurs on Android.
I've tried to start the MainActivity setting the NoAnimation flag for the Intent, but the animation is still there.

Intent intent = new Intent(this, typeof(MainActivity));
intent.AddFlags(ActivityFlags.NoAnimation);
StartActivity(intent);

How to remove this animation?

Best Answer

  • MarlonRibeiroMarlonRibeiro US ✭✭✭
    Accepted Answer

    If is there someone interested, that's how I fixed it:

    Intent intent = new Intent(this, typeof(MainActivity));
    intent.AddFlags(ActivityFlags.NoAnimation);
    this.Window.TransitionBackgroundFadeDuration = 0;
    StartActivity(intent);
    

Answers

  • MarlonRibeiroMarlonRibeiro USMember ✭✭✭
    Accepted Answer

    If is there someone interested, that's how I fixed it:

    Intent intent = new Intent(this, typeof(MainActivity));
    intent.AddFlags(ActivityFlags.NoAnimation);
    this.Window.TransitionBackgroundFadeDuration = 0;
    StartActivity(intent);
    
  • PhenekPhenek Member ✭✭

    Thanks man

Sign In or Register to comment.