Reputation: 103
I am trying to figure out some way to determine the current background on a phone and then set that background as my own in my application to create a seamless transition between my application and the phone. However I haven't been able to find any functions for this at Androids SDK site.
Setting android:theme="@style/Theme.NoBackground" inside my Manifest almost does what I want, but it still has the icons in the background.
Thanks in advance
Upvotes: 1
Views: 740
Reputation:
Try to use the following code in your program, so that you can overcome your problem:
activity android:theme="@android:style/Theme.Wallpaper"
this will help for you.
Upvotes: 1
Reputation: 29745
You should also be able to declare in your manifest that your activity should use the 'wallpaper' theme, like so:
<activity android:theme="@android:style/Theme.Wallpaper">
Upvotes: 1
Reputation: 103
Yeah the WallpaperManager was the answer, a little searching revealed this in one of the API Demos for anyone who needs this.
final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
final Drawable wallpaperDrawable = wallpaperManager.getDrawable();
Obviously add the variable wallpaperDrawable to setBackgroundDrawable();
Upvotes: 1