Search code examples
androidandroid-4.0-ice-cream-sandwich

Android Theme.Holo.Light on Galaxy Nexus has grey background when emulator does not


When I use the theme Theme.Holo.Light, my window background appears white on the emulator (same as using Theme.Light from earlier Android versions). However on the Galaxy Nexus it appears as a light grey. I've taken a screenshot and found it is actually a very slight gradient.

Here is a brand new project created with ADT16. All I have done is set the theme in the manifest:

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

and for contrast put this in the activity:

<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's the screenshot from the emulator running API 15 (and is identical on API 14).

Here it is on a real Galaxy Nexus.

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

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


Solution

  • Theme.Holo.Light does have a grey background.

    The screenshot from your Nexus shows the right behaviour.

    Best wishes, Tim