Question

I have made an live wallpaper. I want to change the bitmap of the wallpaper from the preference activity. I am initializing the bitmap within the constructors and callingcanvas.drawbitmap() into my main thread.

The bitmaps has been initializes once in the constructor. I want to change the bitmap in the preview screen too in the wallpaper.

Was it helpful?

Solution

Give value to bitmap in a separate method and call it in your constructor. call it from onVisibilityChanged(boolean visible) for a change if it is visible before your draw method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top