I have xml shape file
<?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>
How to set it as wallpaper? Is it possible? I need an explanation.
If I execute this, device's default wallpaper to be set.
WallpaperManager wm=WallpaperManager.getInstance(this);
wm.SetResource(R.drawable.bg);