当我使用主题Theme.Holo.Light时,我的窗口背景在模拟器上显示为白色(与使用早期Android版本的Theme.Light相同) 。但是在Galaxy Nexus上,它显示为浅灰色。我做了一个截图,发现它实际上是一个非常微小的渐变。Galaxy Theme.Holo.Light在Galaxy Nexus上有灰色背景当模拟器没有时
这是一个使用ADT16创建的全新项目。我所做的设定主题的清单:
android:theme="@android:style/Theme.Holo.Light"
和对比把这个活动:
<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.
为什么不同?我知道不要相信制造商不会在旧版Android上混淆AOSP主题,但是(i)这是一款Nexus设备,以及(ii)Holo应该是强制性的,并且不会在所有使用Market的设备上进行修改(http:// android -developers.blogspot.co.nz/2012/01/holo-everywhere.html)。
(也许有人比Galaxy Nexus的其他的ICS设备能告诉我他们得到Holo.Light什么 - 也许这是一个模拟器的bug。)
我已经看到了在某些应用程序而不是其他的截屏相同的梯度。该梯度在Galaxy Nexus和运行官方4.0.4固件的Nexus S的屏幕截图中可见。 – Chris 2012-04-08 06:12:22