BorderColor not picking the linearGradient color on android

前端 未结 1 1047
攒了一身酷
攒了一身酷 2021-01-16 14:00

Im trying to create a circle with an image inside it that its border is colourful that\'s why I used LinearGradient.

I was using this guide:

https://codeburs

相关标签:
1条回答
  • 2021-01-16 14:38

    You should add style to the TouchableOpacity:

    style={{
      width: 100,
      height: 100, backgroundColor: 'transparent', overflow: "hidden", borderRadius: 50, flex: 1}}
    

    in addition change the style of profilePhotoContainer to:

    profilePhotoContainer: {
        zIndex: 5,
        position: 'absolute',
        top: Dimensions.get('window').height * .13,
        left: Dimensions.get('window').width / 2 - Dimensions.get('window').width * .13,
        elevation: 4,
        borderRadius: 75,
        padding: 5,
        overflow: "hidden",
        borderColor: 'transparent',
      }
    
    
    0 讨论(0)
提交回复
热议问题