Android Theme.Holo.Light on Galaxy Nexus has a gray background when the emulator is not working

When I use Theme.Holo.Light theme, my background screen looks white on the emulator (same as using Theme.Light from earlier versions of Android). However, on the Galaxy Nexus, it looks light gray. I took a screenshot and found that this is actually a very small gradient.

Here is a new project created using ADT16. All I have done is set the topic in the manifest:

  android: theme = "@ android: style / Theme.Holo.Light" 

and for contrast put this in action:

<TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="This text background is white" android:textAppearance="?android:attr/textAppearanceLarge" android:background="#fff" /> 

Here is a screenshot from an emulator using API 15 (and identical in API 14) .

Here he is on a real Galaxy Nexus.

Why is the difference? I know that manufacturers should not be trusted not to mix AOSP themes on older versions of Android, but (i) this is a Nexus device, and (ii) Holo must be mandatory and unmodified on all devices with Market (http: // android -developers.blogspot .co.nz / 2012/01 / holo-everywhere.html).

(Maybe someone with an ICS device other than the Galaxy Nexus can tell me what they get for Holo.Light - maybe this is an emulator bug.)

+4
source share
2 answers

Theme.Holo.Light has a gray background.

A screenshot from your Nexus shows the correct behavior.

Regards Tim

+1
source

use this in your topic

 <item name="android:windowBackground">@color/your_color</item> 
0
source

Source: https://habr.com/ru/post/1397766/


All Articles