This is one of the things SurfaceView is for.  For a regular view hierarchy
you can't draw outside of updates, period.

I don't know what you mean by clearing the screen with black.  We don't do
that.  Within your window, if the window is translucent, we will clear the
update region back to translucent before drawing the view hierarchy just so
that the drawing will be correct.  Unfortunately there isn't a way right now
to say that a particular view is opaque so the hierarchy can skip drawing of
its parents if the update region is only within that view.

On Wed, Apr 1, 2009 at 12:01 PM, Tomei Ningen <[email protected]>wrote:

> I need to animate at a very fast rate (without using OpenGL). Now I am
> calling View.invalidate() to paint to the screen, but this has the effect of
>
> A: clearing the screen with black
> B: drawing the content view
> C: drawing the child view (which occupies only part of the screen, and is
> the only thing that's animating)
>
> How can I avoid doing A and B at every frame? I am looking for
>
>      Canvas c = getWindow().getCanvas();
>      c.drawSomething();
>      c.doneDrawing();
>
> If this is not possible, can I at least get rid of A?
>
> Thanks
>
>
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to