react-native-circular-progress icon indicating copy to clipboard operation
react-native-circular-progress copied to clipboard

Animation progress bar to move at Anti-Clockwise direction

Open vinayak2095 opened this issue 5 years ago • 9 comments

I want to move my progressBar Anti-clockwise ,how can i do that using this library.

vinayak2095 avatar Mar 08 '19 06:03 vinayak2095

Me too. For instance, + value -> clockwise, - value -> anti-clockwise. Any plan to support this feature?

spikeisryu avatar Mar 24 '19 13:03 spikeisryu

You can use style prop with transform, something like: style={{ transform: [{ scaleX: -1 }] }}

nricardo avatar Mar 27 '19 17:03 nricardo

@nricardo Thanks ,This worked.

vinayak2095 avatar Mar 28 '19 13:03 vinayak2095

@nricardo I tried it as you suggested and the bar moves as I want, but the inner contents are affected, too. ErrorRate

Is there another way to solve this issue?

spikeisryu avatar Mar 28 '19 15:03 spikeisryu

That's because probably applied the transform to the parent view where your progress and text are children off. The fix is simple: isolate those two parts and position absolute the inner contents on top of the circular progress... Hope that solves it...

nricardo avatar Mar 28 '19 16:03 nricardo

@nricardo add the stated transform style on both progress bar and its child content

ManigandanRaamanathan avatar Apr 03 '19 14:04 ManigandanRaamanathan

You can use style prop with transform, something like: style={{ transform: [{ scaleX: -1 }] }}

PLEASE. Someone put this in the documentation!

jedashford avatar Jun 06 '20 03:06 jedashford

@jedashford could you perhaps make a pull request of your improvement idea? :)

markusl avatar Jun 09 '20 06:06 markusl

This is a hacky way though.

<AnimatedCircularProgress
  ...propsYouWant
  style={{ transform: [{ scaleX: -1 }] }}>
  {() => (
    <View style={{ transform: [{ scaleX: -1 }] }}>
      <Text>This is reversed content!</Text>
    </View>
  )}
</AnimatedCircularProgress>

Oh I missed @ManigandanRaamanathan's comment

Jongkeun avatar Oct 31 '23 15:10 Jongkeun