Live Wallpaper As Activity Background

treehousefrog

Member
Licensed User
Longtime User
Hey guys,

This has come up a number of times it seems, but I don't think there's been a resolution yet. I'm creating a homescreen launcher and I want to be able to set live wallpapers as the background.

This thread explains how to set static bitmaps that are the phone background: http://www.b4x.com/forum/basic4andr...-activity-background-current-wallpaper-2.html

Code looks like so:

Dim r As Reflector
Dim backg As Bitmap
Dim d As BitmapDrawable
backg.InitializeMutable(Activity.Width,Activity.Height)
d.Initialize(backg)
r.Target = r.RunStaticMethod("android.app.WallpaperManager", "getInstance", Array As Object(r.GetContext), Array As String("android.content.Context"))
Activity.Background = r.RunMethod("peekDrawable")

And from my explorations I think we need a surface view to host the live wallpaper? If anyone can point me in the right direction I'd be hugely grateful - it's been one of those long days of surfing the web to no avail...

Thanks!
 
That works really well. Even responds to touch.

Is there any way to take control over the horizontal scrolling though?
 
Upvote 0

Similar Threads

Back
Top