Hi all, I'm starting to add animation to my game, but I'm having some
problems
I'm attaching an excerpt of the code:
...
//get coordinates
int[] handLocation = {0,0};
hand.getContainer().getLocationInWindow(handLocation);
int[] deckLocation = {0,0};
deckImg.getLocationInWindow(deckLocation);
//move from deck location to hand location
TranslateAnimation dealCardAnimation = new
TranslateAnimation
(Animation.ABSOLUTE,deckLocation[0],
Animation.ABSOLUTE,handLocation[0],
Animation.ABSOLUTE,deckLocation[1],
Animation.ABSOLUTE,handLocation[1]);
dealCardAnimation.setDuration(400);
deckImg.startAnimation(dealCardAnimation);
//mina
...
I have a deck and 4 hands and I'm dealing cards to them.
I've added this to the deal cards loop
I'm guessing I have more than one mistake here since nothing is
happening on the screen in the entire loop.
I saw some other people have called a post() method on the underlying
layout but I didn't see where it says to do so.
can someone please help me with this?
Thanks,
Sh.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---