當我使用主題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