React-native: borderStyle is ignored on Android unless set on all sides with non-zero borderRadius

Created on 9 Nov 2018  路  4Comments  路  Source: facebook/react-native

Environment

 React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
      Memory: 523.12 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.11.0 - /usr/local/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.4 => 0.57.4
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

When the borderStyle property is set to dashed or dotted, Android will always render a solid border unless the borderWidth is set all around the element and a borderRadius greater than 0 is added. This means you cannot have a styled border on one, two or three sides.

Here's what it looks like in iOS and Android:
iosandroidborderstyle

Seems like this is a regression which was mentioned in closed issues. The most recent is https://github.com/facebook/react-native/issues/18285

Reproducible Demo

Expo Snack: https://snack.expo.io/SkE6cNfT7
Repo: https://github.com/irasantiago/rn-android-border-style

Bug Android Stale

Most helpful comment

With Expo 30.0.0 (RN 0.55.4) the issue is even worse, there is just no way to make dashed or dotted on a view border - not even with borderRadius.

All 4 comments

With Expo 30.0.0 (RN 0.55.4) the issue is even worse, there is just no way to make dashed or dotted on a view border - not even with borderRadius.

any update for this>

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Was this page helpful?
0 / 5 - 0 ratings