react-native: [Android] borderColor is broken for transparent colors
Setting borderColor: "rgba(255, 255, 255, 0.5)"
works but borderColor: "rgba(255, 255, 255, 0.6)"
gives a black border.
Expected:
Android:
Sample app: https://rnplay.org/apps/l1bw2A
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 6
- Comments: 22 (6 by maintainers)
Commits related to this issue
- store borderColor in a non lossy way Summary: Fix for issue #3652 - Converting from `int` to `float` is lossy for very large numbers, so storing `borderColor` as a single `Spacing` object (which use... — committed to facebook/react-native by deleted user 8 years ago
- store borderColor in a non lossy way Summary: Fix for issue #3652 - Converting from `int` to `float` is lossy for very large numbers, so storing `borderColor` as a single `Spacing` object (which use... — committed to LearningDave/react-native by deleted user 8 years ago
- store borderColor in a non lossy way Summary: Fix for issue #3652 - Converting from `int` to `float` is lossy for very large numbers, so storing `borderColor` as a single `Spacing` object (which use... — committed to HomePass/react-native by deleted user 8 years ago
I’ll work on it. anyone who has already started, please let me know here.
Still happens on 0.27.2
Hi all, I have a pull request to fix this here: https://github.com/facebook/react-native/pull/9380
Problem had to do with storing
int
value asfloat
. This is lossy when converting back toint
for very large numbers. To solve this I split color (ARGB) into RGB and Alpha values to be stored separately.I have the same issue with 0.26 on ios as well.
Still happening on 0.26 on Android