Thank you Mark for your answer, but could-you be more specific please?
What do you mean by "pre-compute"?

For more explanation, my dices are custom text views (my dices are
drawn, I don't have drawables for the background) that have a method
setNumDice(int i). When i==0, the method generate a random number
(between 1 and 6) and then call the invalidate() method. Then, the
dice is redrawn with the number of points corresponding to its
property numDice.

On 14 nov, 16:06, Mark Murphy <[email protected]> wrote:
> On Sun, Nov 14, 2010 at 9:52 AM, gontran <[email protected]> wrote:
> > I need to run six animations simultaneously (each animation simulates
> > a roll of dice, each dice is a custom text view) and at the end of
> > those animations,  I need to get back the number of each roll. As each
> > animation changes the number of each dice five times (to simulate the
> > roll), I want to wait that each animation has ended to calculate the
> > sum of each roll.
>
> Why not pre-compute the intended states of each die before starting
> the animation? There is nothing magical about waiting to do your
> random number generation. Figure it all out in advance.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 2.2 Programming Books:http://commonsware.com/books

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