0
我对XML型文件将XML文件设置为壁纸?
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="90"
android:startColor="#420012"
android:centerColor="#670000"
android:endColor="#420012"
android:type="linear" />
<stroke
android:width="1px"
android:color="#560000" />
</shape>
如何将其设置为墙纸?可能吗?我需要一个解释。
如果我执行此操作,设备的默认壁纸将被设置。
WallpaperManager wm=WallpaperManager.getInstance(this);
wm.SetResource(R.drawable.bg);
已经我提到**如果我执行此设备的默认壁纸设置。** –