Live wallpaper questions


Licensed User
Longtime User
Hey everyone,
I have been playing around with live wallpapers, while learning B4A and I'll admit that I'm pretty new to this but I have been playing with one of the lwp demo's, the bouncing smiley one - and I have a few questions.
In my sample, I have modified the bouncing smiley, so that now it displays a falling snowflake.
1. there is a stutter in the display every time the screen is touched, I dont understand why
2. Is there a way to produce a real transparent background on the images, as the snowflakes pile up at the bottom you can see edges of bg color that should be transparent.
3. I would like to make the snowflakes that have fallen shift around on orientation change, right now I realize these are not objects, only artifacts that have not been cleared - how would that be handled?


    60.3 KB · Views: 203


B4X founder
Staff member
Licensed User
Longtime User
1. Have you removed lwm_Touch event?
2. Transparent should be kept.
I've just ran the following test:
Sub Activity_Create(FirstTime As Boolean)
   Dim c As Canvas
   Dim bmp As Bitmap = LoadBitmap(File.DirAssets, "smiley.gif")
   Dim r As Rect
   r.Initialize(10dip, 10dip, 10dip + bmp.Width, 10dip + bmp.Height)
   c.DrawBitmap(bmp, Null, r)
   r.Initialize(20dip, 20dip, 20dip + bmp.Width, 20dip + bmp.Height)
   c.DrawBitmap(bmp, Null, r)
End Sub

3. You will need to implement the logic by saving the position of each flake and then reposition it as needed.
Upvote 0