Skip to content

borderStyle is ignored on Android unless set on all sides with non-zero borderRadius #22226

@irasantiago

Description

@irasantiago

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 #18285

Reproducible Demo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions