Closed petrbela closed 1 year ago
I had the same issue with v5.0.0 on my Android device. Sadly your solution did not remove the black fill in the arc.
Instead a simple workaround helped me:
Set fill="#00000000"
and it gets transparent again.
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
react-native-progress@5.0.0
for the project I'm working on.On web, Circle and CircleSnail render with a black fill. See https://snack.expo.dev/@petrbela/react-native-progress-fill
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-progress/Circle.js b/node_modules/react-native-progress/Circle.js index 79f0a9e..879e3b4 100644 --- a/node_modules/react-native-progress/Circle.js +++ b/node_modules/react-native-progress/Circle.js @@ -168,6 +168,7 @@ export class ProgressCircle extends Component { )} {border ? ( <Arc + fill={fill} radius={size / 2} startAngle={0} endAngle={(indeterminate ? endAngle * 2 : 2) * Math.PI} diff --git a/node_modules/react-native-progress/Shapes/Arc.js b/node_modules/react-native-progress/Shapes/Arc.js index f913a56..acff1f0 100644 --- a/node_modules/react-native-progress/Shapes/Arc.js +++ b/node_modules/react-native-progress/Shapes/Arc.js @@ -86,6 +86,7 @@ export default class Arc extends Component { return ( <Path d={path} + fill="none" strokeLinecap={strokeCap} strokeWidth={strokeWidth} {...restProps}
This issue body was partially generated by patch-package.
this also work for me to solved the issue of progress circle black background
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
react-native-progress@5.0.0
for the project I'm working on.On web, Circle and CircleSnail render with a black fill. See https://snack.expo.dev/@petrbela/react-native-progress-fill
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-progress/Circle.js b/node_modules/react-native-progress/Circle.js index 79f0a9e..879e3b4 100644 --- a/node_modules/react-native-progress/Circle.js +++ b/node_modules/react-native-progress/Circle.js @@ -168,6 +168,7 @@ export class ProgressCircle extends Component { )} {border ? ( <Arc + fill={fill} radius={size / 2} startAngle={0} endAngle={(indeterminate ? endAngle * 2 : 2) * Math.PI} diff --git a/node_modules/react-native-progress/Shapes/Arc.js b/node_modules/react-native-progress/Shapes/Arc.js index f913a56..acff1f0 100644 --- a/node_modules/react-native-progress/Shapes/Arc.js +++ b/node_modules/react-native-progress/Shapes/Arc.js @@ -86,6 +86,7 @@ export default class Arc extends Component { return ( <Path d={path} + fill="none" strokeLinecap={strokeCap} strokeWidth={strokeWidth} {...restProps}
This issue body was partially generated by patch-package.
This worked for CircleSnail but not Circle. Changing to fill="#00000000" resolved the issue.
Hello I tried using CircleSnail and Circle and both the solutions above have not worked :(
Hello I tried using CircleSnail and Circle and both the solutions above have not worked :(
Be sure you have the react-native-svg package installed :)
In my case: Circle is still black:
react-native-svg
from "13.9.0"
to "13.4.0"
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
react-native-progress@5.0.0
for the project I'm working on.On web, Circle and CircleSnail render with a black fill. See https://snack.expo.dev/@petrbela/react-native-progress-fill
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.