I'm trying to animate a view movement in RelativeLayout with respect to others views' position.
So my layout looks like this:
<RelativeLayout>
<View alignParentLeft>
<View centerHorizontal>
<View alignParentRight>
<AnimatedView>
</RelativeLayout>
I use ObjectAnimator to animate this view:
ObjectAnimator.ofFloat(animatedView, "x", animatedView.getX(), childView.getX());
But all child views except the one I'm trying to animate, returns 0 for getX() or getLeft().
I'd appreciate any help.