Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default background color of Theme.AppCompat.Light android

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?

like image 334
turbandroid Avatar asked Jun 30 '16 16:06

turbandroid


People also ask

What is the default background color in Android?

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.

What is ThemeOverlay AppCompat dark ActionBar?

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.

How to set theme android?

Settings. Under Display Options, tap Theme. Select the theme for this device: Light—White background with dark text.


2 Answers

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.

like image 98
Sakchham Avatar answered Oct 03 '22 07:10

Sakchham


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.

like image 27
Marcin Koziński Avatar answered Oct 03 '22 06:10

Marcin Koziński