Closed tezqa closed 7 years ago
Hi,
unfortunately it's not possible with the way the current implementation works. I would need to completely rewrite it which I have no plans to do right now.
In my cases it was often enough to just set the progress-circle's bgColor
to match the View's background color to make it look like it is transparent.
+1 for transparent background
@tezqa @gitlovenotwar It actually is possible with just some minor changes to the current source code. Only took me a dozen or so lines to implement. You simply add border width and border color props to each circle and set the background color of each to transparent. Then set a prop of borderRightWidth: 0 in the half circle styles object. This makes the borders that would normally cut across the middle of the circle disappear. You could alternatively set borderRightColor: 'transparent' and I think that would work too. Lastly, the borderWidth of the outer circle causes the half circles to shift, so you change their positioning to -this.props.borderWidth (negative). Set the positioning info within the half circle render method rather than the styles object so you have access to this.props.
@kevinEsherick @gitlovenotwar I finally ended up with my own circular slider. It handles transparency. Thank you for your help :)
@tezqa @gitlovenotwar It actually is possible with just some minor changes to the current source code. Only took me a dozen or so lines to implement. You simply add border width and border color props to each circle and set the background color of each to transparent. Then set a prop of borderRightWidth: 0 in the half circle styles object. This makes the borders that would normally cut across the middle of the circle disappear. You could alternatively set borderRightColor: 'transparent' and I think that would work too. Lastly, the borderWidth of the outer circle causes the half circles to shift, so you change their positioning to -this.props.borderWidth (negative). Set the positioning info within the half circle render method rather than the styles object so you have access to this.props.
Could you paste some code?
@tezqa @gitlovenotwar It actually is possible with just some minor changes to the current source code. Only took me a dozen or so lines to implement. You simply add border width and border color props to each circle and set the background color of each to transparent. Then set a prop of borderRightWidth: 0 in the half circle styles object. This makes the borders that would normally cut across the middle of the circle disappear. You could alternatively set borderRightColor: 'transparent' and I think that would work too. Lastly, the borderWidth of the outer circle causes the half circles to shift, so you change their positioning to -this.props.borderWidth (negative). Set the positioning info within the half circle render method rather than the styles object so you have access to this.props.
Can you please share your changes?. It'll be helpful
This library is amazing if you also want transparent background Link Package: rn-animated-progress-circle
Hello,
Any idea to add transparency inside the circle?
Thank you for your work!