Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Prevent initial fade in animation on showing first page

$
0
0

Hi guys,

I know there have been a lot of threads around page transition animations already, but none seem to address or solve the issue I am having around preventing an initial fade in animation on Android for a Xamarin Forms app.

Basically, what I have at the moment is a splash screen image which I display using a theme in my Xamarin Android app - this works fine, the app loads and show my splash screen. What I then want to do is seamlessly transition to my initial Xamarin Forms XAML page which is going to show the SAME image which I then want to animate to the top and show a login so it looks like one seamless load and animate, even though behind the scenes the app is transitioning from the initial splash screen to the first real page of the app.

The problem is, no matter what I try I cannot seem to prevent the initial Xamarin Forms page from performing some kind of fade in transition when it loads which gives a jarring flash effect. My code is very simple, the initial Forms page is a simple ContentPage with an image:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="App1.Views.FromSplash">
   <ContentPage.Content>
         <Image Source="splashscreen.png" Aspect="AspectFill" VerticalOptions="Center" Margin="0, 23, 0, 0" />
    </ContentPage.Content>
</ContentPage>

and in my App.cs I wrap it in a NavigationPage and set it to the main content:

MainPage = new NavigationPage(new FromSplash());

I have tried everything I can think of, including creating custom NavigationRenderer/NavigationPageRenderer implementations for the NavigationPage that override the various OnPush/Pop/PopToRoot methods negating any animations but nothing I do seems to prevent that initial fade in animation when the app first transitions from showing the splash screen to showing that first page.

Does anyone have any ideas on what might help?

Thanks in advance!


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>