2012-12-10 41 views
-1

我爲我的PreferenceActivity設置了WindowBackground。WindowBackground Android 2.3.3 PreferencActivity

當我使用2.3.3背景圖像顯示正確,但是當我滾動原始主題來到前景。在我的情況下白色背景。

我的清單文件:

<activity android:name=".Activity_Settings" android:screenOrientation="portrait" android:theme="@style/PreferencesTheme"/> 

我的風格:

<style name="PreferencesTheme"> 
     <item name="android:windowBackground">@layout/repeat</item> 
</style> 

誰能給我一個提示,爲什麼背景變爲而IAM滾動的原單主題?

問候 雅尼克

PS:在Android 4.0上一切工作正常。

編輯:我@佈局/重複是:

<bitmap xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:src="@drawable/background" 
android:tileMode="repeat" /> 
+0

重複是你的佈局放置在res/layout /? –

+0

是的,我添加了我的佈局/重複問題。 – schw4ndi

+0

我認爲repeat.xml應該在'res/drawable'文件夾中。在res/drawable文件夾中放置repeat.xml後,你可以試試嗎? –

回答

0

我想通了,請確保您設置的緩存顏色提示在活動的OnCreate梅索德:

getListView().setCacheColorHint(Color.TRANSPARENT);