Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

White background during app launch

I want to get rid of the white color during the short period when my app is launching but the content isn't displayed, yet.

My main activity is using a style (from the Manifest) that extends @style/Theme.Sherlock.Light.DarkActionBar with the background set to <item name="android:background">@android:color/transparent</item>. Nowhere in my layout do I use a white background color, yet it appears for a brief moment during app launch.

In the HierarchyViewer I exported the layers and checked back that there is really no white solid in the layout hierarchy.

What setting controls the background color before the layout is drawn? Thanks.

like image 744
Kirill Rakhman Avatar asked Jan 22 '13 15:01

Kirill Rakhman


People also ask

How do I get rid of white splash screen flutter?

On the right hand side under properties, you will find the background attribute. Clicking on this and choosing custom will allow you to define the RGB value to override the white screen. After following these steps, your app will now no longer show the annoying white screen on either Android or iOS.


1 Answers

There's another background attribute in your theme - windowBackground, and you implicitly set it to white by inheriting your style from @style/Theme.Sherlock.Light.DarkActionBar (notice the .Light. part in the name).

You can either use dark version of theme or set it explicitly by including windowBackground in your style definition:

<item name="android:windowBackground">@color/your_color</item>   
like image 159
Andrii Chernenko Avatar answered Sep 17 '22 14:09

Andrii Chernenko