2011-08-23 64 views

回答

1

创建绘制/ background.xml:

<?xml version="1.0" encoding="utf-8"?> 
<bitmap xmlns:android="http://schemas.android.com/apk/res/android" 
    android:src="@drawable/icon" /> 

创造价值/ styles.xml:

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
<style name="CustomTheme" parent="android:Theme.Light"> 
    <item name="android:windowBackground">@drawable/background</item> 
</style> 
</resources> 

而且在manifest.xml的这个主题应用到您的活动或应用程序:

android:theme="@style/CustomTheme"

这个主题的默认图像(的icon.png)适用于p roperty windowBackground。

+0

不仅适用于一个应用程序,而且适用于整个移动设备/仿真器。 –

+0

设备/模拟器的主题远远超过单个jpg/png文件。或者,如果您想更改壁纸 - 长按桌面 - >个性化显示 - >壁纸 - >并选择您需要的图像。 –

+0

我需要将主题设置为移动设备。 –