Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android][Fix]Properly set borderRadius on Android #25626

Closed
wants to merge 1 commit into from

Commits on Jul 13, 2019

  1. Properly set borderRadius on Android

    In orde to properly set the view's borderRadius the inner*RadiusX/inner*RadiusY should not
    be used, since their values are obtained via the following formula:
    
    int innerTopLeftRadiusX = Math.max(topLeftRadius - borderWidth.left, 0);
    
    If topLeftRadius and borderWidth.left have the same value innerTopLeftRadiusX will
    be zero and it will cause the top left radius to never be set since
    "(innerTopLeftRadiusX > 0 ? extraRadiusForOutline : 0)" will evaluate to zero.
    In order to prevent this issue the condition will only consider topLeftRadius, topRightRadius, and etc.
    cabelitos committed Jul 13, 2019
    Configuration menu
    Copy the full SHA
    139c462 View commit details
    Browse the repository at this point in the history