Skip to content

Android - aliasing on borderRadius #41226

@steven-sh

Description

@steven-sh

Description

After upgrading my project to the latest version of react native (from 0.62) I've noticed that antialiasing is no longer applied to the borders of Views when a borderRadius is applied. This is particularly noticeable on low DPI devices such as tablets.

I mainly use borderRadius for round buttons, or rectangular buttons with rounded corners. Is there a better way to do it that will give me antialiasing?

I've attached screenshots of a view with a borderRadius applied in both 0.72 and 0.62 and linked to a reproducer project.

React Native Version

0.72.6

Output of npx react-native info

System:
OS: macOS 13.6
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 1.49 GB / 16.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 16.13.2
path: /usr/local/bin/node
Yarn: Not Found
npm:
version: 8.1.2
path: /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.12.1
path: /Users/ghee/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10406996
Xcode:
version: 15.0/15A240d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.20
path: /usr/local/opt/openjdk@11/bin/javac
Ruby:
version: 2.7.4
path: /Users/ghee/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: 0.72.6
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found

Steps to reproduce

Create a view with a nonzero borderRadius in its style.

Snack, screenshot, or link to a repository

rn62
rn72

https://github.com/steven-sh/react-native-72-aliasing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.Platform: AndroidAndroid applications.Resolution: FixedA PR that fixes this issue has been merged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions