Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top