What is the color code (hex) Android System use if windowBackground set to null as follows for parent theme Theme.AppCompat.Light
<item name="android:windowBackground">@null</item>
Can anyone help me to know the exact hexa code?
4.2. By default each activity in Android has a white background. To change the background color, first add a new color definition to the colors.
Theme. AppCompat is used to set the global theme for the entire app. ThemeOverlay. AppCompat is used to override (or “overlay”) that theme for specific views, especially the Toolbar. Let's look at an example for why this is necessary.
Settings. Under Display Options, tap Theme. Select the theme for this device: Light—White background with dark text.
It uses
<color name="material_grey_50">#fffafafa</color>
as described in the theme Platform.AppCompat.Light
. This value is for appcompat-v7:23.4.0
and might differ on other versions.
If you set android:windowBackground
to null then you're not going to get default colour from parent theme. You're actually overriding this to be null, which means nothing's going to be painted as your window background. If your layouts don't cover the window completely with their own backgrounds then you're going to see random artifacts.
In other words Avoid Null Window Backgrounds.
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