You should redraw the whole canvas. It's possible to lock only part of
the canvas though. SurfaceView is intended for game applications that
refresh their screen very often.

On Aug 10, 7:59 am, SChaser <crotalistig...@gmail.com> wrote:
> I wrote a little test program that has a custom SurfaceView class and
> some buttons to let me cause various operations on them (draw bitmap
> over all of it - white or black, draw a circle on it, draw blue bitmap
> and circle).
>
> In each case, the drawing is done on a canvas obtained with
> getHolder.lockCanvas().
>
> If I draw the white background in one op, then draw the red circle,
> the background vanishes. If I draw the red circle again, the white
> background re-appears behind it.
>
> Other operations have similar results - it's as if there is a toggle
> on the "background" pixels (those untouched by the circle drawing) -
> draw the circle once - get one background, draw it again, get
> another.
>
> Obviously I don't understand the semantics of SurfaceView.
>
> Any pointers?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to