Hi everyone,

I have some questions while I am trying to understand how to create
different layout animations with android. I have all the animations I
want working but I don't really understand what they mean....

My first question:
      What is the difference between
Animation.RELATIVE_TO_PARENT, .ABSOLUTE, .RELATIVE_TO_SELF .
I assume that Relative to parent means that the values you pass in for
start and finish apply to the coordinates of the parent, absolute
would be absolute pixels and relative to self would be based on the
coordinates of the control you are referring to?

So if I want to hide something off screen and slide into view I have
to use RELATIVE_TO_PARENT like below:
         Animation inFromLeft = new TranslateAnimation(
                        Animation.RELATIVE_TO_PARENT,  -1.0f,
Animation.RELATIVE_TO_PARENT,  0.0f,
                        Animation.RELATIVE_TO_PARENT,  0.0f,
Animation.RELATIVE_TO_PARENT,   0.0f

If I did .RELATIVE_TO_SELF would it still be hidden off screen and
work the same way?

Also is -1.0f off the left side, 0 shows and +1 is off the right side
or what to those number mean. I know the first set are X and the
second set are Y.

Thanks for your time and helping me understand how the code works.

Tommy

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