splash screen visible when navigate to new page in xamarin.forms android. i want remove or hide the background image
I did not understand your question.Could you be a little more illustrative?
Could you please post more details or a basic demo?
<?xml version="1.0" encoding="utf-8"?>
<!-- Base theme applied no matter what API -->
<style name="Theme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<!--We will be using the toolbar so no need to show ActionBar-->
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
<!-- colorPrimary is used for the default action bar background -->
<!-- colorPrimaryDark is used for the status bar -->
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
</style> <style name="MyTheme.Splash" parent="Theme.AppCompat.Light.NoActionBar"><item name="android:windowBackground">@drawable/Splash</item> </style>
this is my style.xml . Splashscreen image visible when navigate one page to another page.
Sorry ,I still can't understand your question. Where is the style.xml file used? Could you please post more details or a basic demo?
it is in my project.android resource folder
It sounds like your splash screen is on the bottom of your view stack and your placing your other views on top of it. When you close a screen it animates the view away thereby showing the splash screen below it in the stack, then your new view loads and animates scrolling in again thereby hiding it again.
Are you using Xamarin forms? If so the function below will allow you to put your desired view as the only view in your view stack. Its important to note though that if you use this to show your view then the back button will not navigate back to previous views, it will exit your application as there will be no other views to show
/// Show the passed in page as root and unload all others
/// <param name="p">Page to show as root</param>
public async void ShowAsRoot(ContentPage p)
// Get list of existing pages
List<Page> stack = this.Navigation.NavigationStack.ToList();
// Set new page
await this.Navigation.PushAsync(p, false);
// Remove all other pages
foreach (Page n in stack)
catch (Exception e)
In Activity attribute, let your theme be Theme = "@style/MyTheme.Splash".
And after LoadApplication(new App());
You can set your default theme as SetTheme(Resource.Style.Theme.Base);
It will solve your problem.
I've got the same problem. But the "SetTheme" solution is not working for me, I still see the splashscreen inbetween pages. I also see it as a background, when I don't specify any background color on all of my pages.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies