Skip to content
This repository was archived by the owner on Feb 8, 2022. It is now read-only.

sameCenterHorizontalAs not work #28

@sorosunrain

Description

@sorosunrain

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions