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.
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.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With