florent37/ExpectAnim

sameCenterHorizontalAs not work

sorosunrain opened this issue · 0 comments

@OverRide
public Float getCalculatedValueX(View viewToMove) {
if(horizontal) {

        final float x = viewCalculator.finalPositionLeftOfView(otherView);
        final float myWidth = viewToMove.getWidth() / 2f;
        final float hisWidth = viewCalculator.finalWidthOfView(otherView) / 2f;

        if (myWidth > hisWidth) {
            return x - myWidth + hisWidth;
        } else {
            return x - hisWidth + myWidth;                       [HERE]
        }
    } else return null;
}

does 'return x - hisWidth + myWidth' -> 'return x + hisWidth + myWidth' ?
I think + is right.