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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top