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.
How to change bitmap in live wallpaper from preference activity in android
-
29-08-2022 - |
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.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow