after the state of something you are interested in changes you can call
invalidate() on the canvas which will afaik cause the canvas to be redrawn
as soon as the UI thread gets to it.

On Thu, Mar 5, 2009 at 8:09 PM, mcmc <[email protected]> wrote:

>
> I have a method (let's call this methodA) and I would like the onDraw
> function to be called in the middle of method A.
>
> How would I do this? Right now, my onDraw is not being called at all.
>
>
> private class DemoView extends View{
>                public DemoView(Context context){
>                        super(context);
>                }
>
>                @Override protected void onDraw(Canvas canvas) {
>                        super.onDraw(canvas);
>                        canvas.drawColor(Color.WHITE);
>                }
>
>                public void methodA(){
>                        // do something
>
>                        // i want onDraw to be called here...
>
>                        // do something
>                }
> }
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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