Hi,
In standard Java, you use repaint() to force the paint() method.
paint() method starts after the end of the current method. I explain :
public void joueIA()
{
PosC=1;
repaint();
PosL=1;
}
The paint method will start after the end of joueIA method (after
PosC=1 and PosL=1).
If you want to force the paint method immediately, you can use the
paintImmediately method.
public void joueIA()
{
PosC=1;
paintImmediately(0,0,getWidth(),getHeight());
PosL=1;
}
Then, PosC=1, next the paint method starts and at the end of paint
method, posL=1.
===================================
OK, now, what's happen under Android Java :
You have this code :
public void joueIA()
{
PosC=1;
invalidate();
PosL=1;
}
This code is the same as the repaint method (PosC=1 and PosL=1, next
onDraw starts)
The question is : What is the same as paintImmediately method under
Android, in order to force onDraw method in the middle of a method ?
Thanks for all,
Chaton.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---