2 thoughts on “borderRadius on RectButton on Android

  1. This issue has been reffered in one of PRs. As soon as it will have been merged, I suppose the problem will be solved.
    I close the issue

  2. Why is this closed? I’m still unable to set borderRadius on RectButton.

    Setting borderRadius on RectButton does not actually round the corners. Current workaround is to wrap a RectButton with a View that has a borderRadius set.

    Didn’t work either.

    Screenshot_1

    The border represents the view wrapping the RectButton and the grey area the RectButton itself.

    Code:

    <View style={style.borderRadiusOf50}>
      <RectButton>
        <View accessible style={[style.square, style.squareTypeOne]}>
          <Image
            resizeMode="center"
            source={oxygenLogo}
            style={style.logo}
          />
          <Text style={style.buttonLabel}>
            Recarga de cilindros de oxigênio
          </Text>
        </View>
      </RectButton>
    </View>
    

    Solution

    I found out while writing this comment that RectButton needs backgroundColor for borderRadius to work. I also just checked the docs and there’s nothing mentioning this requisite in there so it’s kinda unintuitive.