tags:

views:

40

answers:

1

I am using android 2.2 & creating live wallpaper based on cubewallpaper example in android sample

I am loading array of bitmap one by one on a canvas after few interval of time at the same place/position i,e, X and Y position (it is one type of rotated image banner).

Now the problem is

If i am locking the canvas using following code

canvas = holder.lockCanvas();

and after that i am loading some bitmap in on canvas and then lock it using following code

holder.unlockCanvasAndPost(canvas);

then again if i lock the canvas and lode some more bitmaps then previously drawn bitmaps are getting wiped out. so how can i preserve/retain the old bitmaps.

A: 

Hi follow this link, it has example. this may help you

http://www.droidnova.com/playing-with-graphics-in-android-part-vii,220.html

Praveenb
well i went through this example n what i found it that every time (i.e. every time a thread runs) game background and other bitmaps are being drawn on the canvas.But what i want is to update only a particular section inside canvas. so do u have any idea how to do that ?
Hunt