Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

borderRadius on RectButton on Android #59

Closed
brentvatne opened this issue Nov 23, 2017 · 4 comments
Closed

borderRadius on RectButton on Android #59

brentvatne opened this issue Nov 23, 2017 · 4 comments

Comments

@brentvatne
Copy link
Collaborator

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.

@vpodolyan
Copy link

vpodolyan commented Mar 30, 2018

The same with borderWidth and borderColor

@osdnk
Copy link
Contributor

osdnk commented Apr 25, 2018

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

@GoldenMaximo
Copy link

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.

@kesha-antonov
Copy link

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.

Thanks! Setting backgroundColor helped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants