react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[Android] Border radius overflow + missing style support

Open mattds opened this issue 11 years ago • 5 comments

Hi team, would it be possible to support the styles borderTopLeftRadius, borderTopRightRadius, borderBottomLeftRadius and borderBottomRightRadius on Android as these don't seem to be supported at the moment and no mention is made of this in the documentation? Also at the moment overflow doesn't crop a view to within the border if a border radius is specified on android, an example of this is here, thanks: https://rnplay.org/apps/ktczIA

mattds avatar Sep 24 '15 08:09 mattds

Hi @mattds, this is not supported on Android yet. Would be happy to review a pull request.

mkonicek avatar Sep 24 '15 13:09 mkonicek

PR would be welcome. Good place to start looking would be https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java#L216 we can use addRoundRect method version with separate radius for each side. Note that ImageView has it's own logic for handling rounded borders.

kmagiera avatar Sep 24 '15 13:09 kmagiera

Hi, I've submitted a pull request as suggested https://github.com/facebook/react-native/pull/3035. Please review when you have a chance to, thanks.

mattds avatar Sep 25 '15 14:09 mattds

thanks to you @mattds ! Closing this and let's continue discussion on #3035

kmagiera avatar Sep 25 '15 16:09 kmagiera

image

uc-hus avatar Sep 17 '16 18:09 uc-hus