When working with TranslateAnimations, you can move a specific object from position A to position B. Can the coordinates for these positions be designated Relative_To_Self or Relative_To_Parent? These positions are presented as a percentage.
What exactly does this mean?
As an example, suppose I have a Relative_Layout whose width is set to Fill_Parent and the ImageView in it whose width allows us to say that it is 80 pixels.
Here is the definition I'm looking at:
public TranslateAnimation (int fromXType, float fromXValue, int toXType, float toXValue, int fromYType, float fromYValue, int toYType, float toYValue)
If I set my fromXType to Relative_to_parent, and my value from 0.0 is 0.0. Does this mean that my ImageView will start in the far left corner of the screen?
If I configured it to Relative to Parent and fromXValue as -1.0. Does this mean that it will start at -80 pixels from where it was originally?
Are my assumptions correct? Thank you in advance for any help.
source share