-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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 border style without borderRadius #6789
Conversation
8106095
to
06ca452
Compare
will also fix #3159. I haven't tested this change tho. |
@@ -95,7 +95,7 @@ | |||
|
|||
@Override | |||
public void draw(Canvas canvas) { | |||
if ((!CSSConstants.isUndefined(mBorderRadius) && mBorderRadius > 0) || mBorderCornerRadii != null) { | |||
if ((!CSSConstants.isUndefined(mBorderRadius) && mBorderRadius > 0) || mBorderCornerRadii != null || mBorderStyle != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check for "solid" too?
@ide please don't merge. In that solution there is problem with changing border style. I need more time to explore code. |
06ca452
to
b0521f8
Compare
@skv-headless updated the pull request. |
@ide done. But variable names are not obvious. And I'm not sure about difference between |
b0521f8
to
be11548
Compare
@ide Do I need to explain something? |
@@ -322,6 +327,7 @@ private int getFullBorderColor() { | |||
} | |||
|
|||
private void drawRectangularBackgroundWithBorders(Canvas canvas) { | |||
updatePathEffectForBorderStyle(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this call go above line 341?
@kmagiera What do you think? |
8f3d0fd
to
2d9bab6
Compare
@skv-headless updated the pull request. |
Do I need to do something else? My changes are pretty straightforward. |
@skv-headless This is waiting for a review by @kmagiera who I believe has context on this part of the codebase. If he doesn't get back to you in a few days please ping me. |
2d9bab6
to
76dcc31
Compare
@skv-headless updated the pull request. |
ping @mkonicek |
@@ -46,7 +46,6 @@ var ViewBorderStyleExample = React.createClass({ | |||
<View> | |||
<View style={{ | |||
borderWidth: 1, | |||
borderRadius: 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the border radius from the example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To show that this patch is working.
Thanks for the fix! Looks good, just some small nits. |
76dcc31
to
b04b10f
Compare
@skv-headless updated the pull request. |
boolean roundedBorders = mBorderCornerRadii != null || | ||
(!CSSConstants.isUndefined(mBorderRadius) && mBorderRadius > 0); | ||
|
||
if ((mBorderStyle == null || mBorderStyle == BorderStyle.SOLID) && !roundedBorders) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this condition because I'm not sure how to call (mBorderStyle == null || mBorderStyle == BorderStyle.SOLID)
this condition
@mkonicek I've updated PR. Sorry for delay I was really busy 😫 |
b04b10f
to
cc7a78f
Compare
@skv-headless updated the pull request. |
call drawRoundedBackgroundWithBorders if borderStyle set
@skv-headless do you have any updates for this pull request? It's been a while so we wanted to check in and see if you've looked at the requested changes. |
@mkonicek ping |
No problem @skv-headless, sorry on the delay on my side too :) @facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
58876d5
@mkonicek @skv-headless this change broke ObjC tests. Considering that it is a long weekend ahead of us we don't want to have a red trunk I'll do a revert. |
see #7303 |
Is it documented anywhere how to update the snapshot tests? I know @grabbou had to do it a few days ago maybe he can help. |
I think it is not documented but it is relatively straight forward. On Sat, Apr 30, 2016 at 1:10 AM, Janic Duplessis notifications@github.com
|
@janicduplessis thanks for the reminder, I am on that ;) |
Summary: closes facebook#6721 closes facebook#3159 before(without borderRadius) ![bug](https://cloud.githubusercontent.com/assets/1488195/14235087/fcf79f8a-f9eb-11e5-9d44-7ab1d131be24.jpg) after ![fix](https://cloud.githubusercontent.com/assets/1488195/14235067/8cf128b4-f9eb-11e5-8170-ad3a146d6104.jpg) Closes facebook#6789 Differential Revision: D3240657 Pulled By: mkonicek fb-gh-sync-id: 4eb8f72d7278d880297fb73653ef530719af3d5b fbshipit-source-id: 4eb8f72d7278d880297fb73653ef530719af3d5b
Summary: closes facebook#6721 closes facebook#3159 before(without borderRadius) ![bug](https://cloud.githubusercontent.com/assets/1488195/14235087/fcf79f8a-f9eb-11e5-9d44-7ab1d131be24.jpg) after ![fix](https://cloud.githubusercontent.com/assets/1488195/14235067/8cf128b4-f9eb-11e5-8170-ad3a146d6104.jpg) Closes facebook#6789 Differential Revision: D3240657 Pulled By: mkonicek fb-gh-sync-id: 4eb8f72d7278d880297fb73653ef530719af3d5b fbshipit-source-id: 4eb8f72d7278d880297fb73653ef530719af3d5b
Summary: closes facebook#6721 closes facebook#3159 before(without borderRadius) ![bug](https://cloud.githubusercontent.com/assets/1488195/14235087/fcf79f8a-f9eb-11e5-9d44-7ab1d131be24.jpg) after ![fix](https://cloud.githubusercontent.com/assets/1488195/14235067/8cf128b4-f9eb-11e5-8170-ad3a146d6104.jpg) Closes facebook#6789 Differential Revision: D3240657 Pulled By: mkonicek fb-gh-sync-id: 4eb8f72d7278d880297fb73653ef530719af3d5b fbshipit-source-id: 4eb8f72d7278d880297fb73653ef530719af3d5b
closes #6721 closes #3159
before(without borderRadius)
after