I want to make the same animation in xml as in code.
I code I have this
Animation a = new TranslateAnimation(Animation.RELATIVE_TO_PARENT , 1.1f, Animation.RELATIVE_TO_PARENT, -0.2f,
Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f);
I start with this in my xml anim file but I do not know how to tall him that the translation should be relative to parent
<translate
android:duration="2500"
android:fromXDelta="-0.1"
android:fromYDelta="0"
android:toXDelta="200"
android:toYDelta="0" />
Namely I do not know how to specify the fromXType attribute
fromXType Specifies how fromXValue should be interpreted. One of Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or Animation.RELATIVE_TO_PARENT.
you need to use the P parameter like this
read here