[android-developers] Re: Animation

2009-09-22 Thread HVT

So kindly can you suggest me what am I supposed to use?

Thanks in advance.

On Sep 21, 10:20 pm, Dianne Hackborn hack...@android.com wrote:
 Don't use animations.  This is not what they are for.  They are for
 performing transitions between different states of a UI, not for writing
 game-like interactions.





 On Mon, Sep 21, 2009 at 1:56 AM, HVT vikramhiman...@gmail.com wrote:

  Hello All,

  I'm facing a problem while clicking the objects while they animate.
  Please help me identify the click on the objects while they are
  animating.

  My requirement is to randomly move a ball around the screen and the
  user should be able to click this ball any time.

  Also this ball changes colours. For this is i have 3 different images
  of different colours and I want to create a frame by frame animation
  between them while they are animating.

  This makes it 2 animations at a time. a frame-by-frame animated image/
  object has to animated may be a /translate animation and this should
  be click able.

  Please help me fix this. I have stuck on this part for almost over a
  month now.

  Thanks,
  HVT

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Animation Problem

2009-09-21 Thread HVT

I know its too late but Thanks for the reply.

Basically what I want is a combination of Translate and rotate
animation.

I dont know if i chose the right thing as i'm very new to android.

I want to animate a object on a random curve (like a freehand drawn
curve which has no specific shape).So for this i chose a animation set
of translate and rotate animatinos.

I hope it makes sense.

and also i want to capture clicks on the object while it animates.

Do you think you can help me?

Probably i chose the wrong approach kindly correct me if so.

Actually if you have a little idea of iPhone development, this kind of
animation can be achieved by making a image animate on a Path. And
this path can be created by us by supplying random values.

Its a cake walk in iPhone.



On Aug 11, 10:36 pm, jhoffman keshis...@gmail.com wrote:
 I'm not sure about the coordinates thing, but if you are trying to use
 rotateAnimation to rotate something such that it looks like it is
 spinning in-place, then 0,0 are not the coordinates you want. The
 coordinates are a 'pivot point'; you could think of them as the
 'middle' of the rotation.

 If you want an object to rotate or spin without moving up/down/left/
 right, then what you actually want is:  RotateAnimation spin = new
 RotateAnimation(0.0f, 360.0f,Animation.RELATIVE_TO_SELF, 
 0.5f,Animation.RELATIVE_TO_SELF, 0.5f);

 This gives the middle of the image as the 'pivot' so it doesn't move
 in an arc. Hope this helps!

 On Aug 11, 1:59 am, HVT vikramhiman...@gmail.com wrote:



  Hello All,

  I'm new to Android and trying to develop an app that has loads of
 animation.
  Its a small game.

  Currently i have a object (image) moving around the canvas. I used
 animationto animate it around the screen.

  But the problem here is i dont have the XY coordinates of that object
  while its animating.
  I want to get the coordinates of the bitmap whenever i want during the
 animation.

  I think if there was some way where i can read the presentation layer
  probably i could get the cordinates of the object.

  Please help me guys i'm stuck here now for like a week.

  My another problem is with rotateanimation, i some how dont seem to
  understand its functionality.
  I have played with it for a couple of days but no luck, i'm still new
  to it and dont get anything.

  The object makes big arcs even if the  x,y values are  0,0 and the
  object jumps around when i try to give it random values.

  Any help would be highly appreciated.

  Thanks in advance.

  HVT

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



[android-developers] Animation

2009-09-21 Thread HVT

Hello All,

I'm facing a problem while clicking the objects while they animate.
Please help me identify the click on the objects while they are
animating.

My requirement is to randomly move a ball around the screen and the
user should be able to click this ball any time.

Also this ball changes colours. For this is i have 3 different images
of different colours and I want to create a frame by frame animation
between them while they are animating.

This makes it 2 animations at a time. a frame-by-frame animated image/
object has to animated may be a /translate animation and this should
be click able.

Please help me fix this. I have stuck on this part for almost over a
month now.

Thanks,
HVT

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



[android-developers] Animation Problem

2009-08-11 Thread HVT

Hello All,

I'm new to Android and trying to develop an app that has loads of
animation.
Its a small game.

Currently i have a object (image) moving around the canvas. I used
animation to animate it around the screen.

But the problem here is i dont have the XY coordinates of that object
while its animating.
I want to get the coordinates of the bitmap whenever i want during the
animation.

I think if there was some way where i can read the presentation layer
probably i could get the cordinates of the object.

Please help me guys i'm stuck here now for like a week.


My another problem is with rotate animation, i some how dont seem to
understand its functionality.
I have played with it for a couple of days but no luck, i'm still new
to it and dont get anything.

The object makes big arcs even if the  x,y values are  0,0 and the
object jumps around when i try to give it random values.

Any help would be highly appreciated.


Thanks in advance.


HVT

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