ExpectAnim icon indicating copy to clipboard operation
ExpectAnim copied to clipboard

sameCenterHorizontalAs not work

Open sorosunrain opened this issue 8 years ago • 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.

sorosunrain avatar Jul 12 '17 13:07 sorosunrain