Borders with opacity and border radius don't work on Android
@jorge-cab ci sta già lavorando.
Dal 26/2/2025.
- Lingua principale
- C++
- Stelle
- 127k
- Fork
- 25.3k
- Merge medio
- 1g 23h
- PR unite (30g)
- 4
Descrizione
Description
There's a problem with the border on android when using a borderColor with some level of transparency. Not only that, but when combining it with any level of borderRadius turns into another problem.
The borders seem to be one over another when using transparency, this results in weird edges with a different color.
Then when adding borderRadius to the element, instead of the border being over the background, it grows outside of the element, so the transparency of the border will be merged with the background color of the container instead of the one on the element.
Steps to reproduce
- Add
borderWidthand aborderColorwith opacity (likergba(0, 0, 0, 0.5)or#00000066) to a View. - Add any borderRadius value to the View.
React Native Version
0.74.3
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
System:
OS: macOS 15.3
CPU: (12) arm64 Apple M2 Pro
Memory: 90.14 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.17.0
path: ~/.volta/tools/image/node/20.17.0/bin/node
Yarn:
version: 1.22.22
path: ~/.volta/tools/image/yarn/1.22.22/bin/yarn
npm:
version: 10.8.2
path: ~/.volta/tools/image/node/20.17.0/bin/npm
Watchman:
version: 2024.12.02.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK:
API Levels:
- "31"
- "34"
- "35"
Build Tools:
- 34.0.0
- 35.0.0
System Images:
- android-35 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2412.12266719
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.3
wanted: 0.74.3
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
NA
Reproducer
https://snack.expo.dev/@ldiaz-occ/border-error-on-android
Screenshots and Videos
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.