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

[Android] CircleSnail shows a black rectangle on react-native v0.57

Open s-o-r-o-u-s-h opened this issue 6 years ago • 22 comments

Hi After upgrading my react-native project to 0.57, on Android, CircleSnail component shows a black reactangle. It was working on v 0.56. My code:

    import * as Progress from 'react-native-progress';
    
    // in render()
    <Progress.CircleSnail size={80} color='#ffffff' indeterminate/>

s-o-r-o-u-s-h avatar Sep 15 '18 11:09 s-o-r-o-u-s-h

update: I checked on both Windows and Linux. I also checked with Android v7.0 & v8.0, nothing changed and the problem still exists. I took a look at the ReactNativeART and found nothing because both versions(0.56 & 0.57) are almost identical.

s-o-r-o-u-s-h avatar Sep 15 '18 13:09 s-o-r-o-u-s-h

i got the same issue when upgrade RN 0.57. in <Progress.Circle />. in ios work fine, but every android devices, just a black square.

NguyenHoangMinh1996 avatar Sep 20 '18 10:09 NguyenHoangMinh1996

Same issue here, very frustrating!

ghost avatar Sep 30 '18 21:09 ghost

Just ran into this too.

danvass avatar Oct 08 '18 01:10 danvass

I see two behaviours:

  • black background
  • blue color of the text shown - should be the pie color
  • transparent (or maybe white) color of the pie (so it's inivisible)

<Progress.Circle ...>

Using react 0.57.2 - this has worked nicely with 0.56

AnagramEngineering avatar Oct 09 '18 10:10 AnagramEngineering

ReactNative: 0.57 React-Native-Progress: 3.5.0

Upon launching of my app I use <Progress.Circle > which use to work fine but since upgrading it just shows a black box.

Also, within my app I have a refresh button and upon tapping the button the <Progress.Circle > shows up but does not animate.

Hope this helps at all.

It did work with RNP 3.4 and RN 0.55

BStenfors avatar Oct 10 '18 16:10 BStenfors

Same issue and it's weird, it's only happen the first time the component is <Progress.Circle/> is loaded !

younes200 avatar Oct 18 '18 13:10 younes200

Facing the same issue. Only happens when the component is loaded. After that it works fine. RN 0.57

lakshin avatar Oct 29 '18 18:10 lakshin

Same issue. Do you have any workaround for this issue?

tianjyan avatar Nov 14 '18 02:11 tianjyan

Yes,same issue. i use version RN 0.57.3 Circle And CircleSnail color Black.

Toshihiro2010 avatar Nov 14 '18 03:11 Toshihiro2010

Same issue

philwilks avatar Nov 15 '18 17:11 philwilks

I found out the workaround. In my case, It works well as intended on Android devices.

I hope this helps.

constructor(props: Props) {
  super(props);
  this.state = {
    isVisible: false,
  };
}

componentDidMount() {
  requestAnimationFrame(() => {
    this.setState({
      isVisible: true,
    });
  });
}

render() {
  if (!this.state.isVisible) {
    return null;
  }

  return (
    <View style={styles.container}>
      <Progress.Circle
        size={52}
        progress={0.5}
        unfilledColor="#fff"
        color="#ff457f"
        thickness={2}
        borderWidth={0}
      >
      </Progress.Circle>
    </View>
  );
}

ifsnow avatar Nov 20 '18 07:11 ifsnow

@ifsnow Is your workaround to set it to be invisible initially and then load it in?

Slooowpoke avatar Nov 20 '18 09:11 Slooowpoke

@Slooowpoke Yes. I don't fully know why this solves the issue. but, It work well for me.

ifsnow avatar Nov 20 '18 12:11 ifsnow

I found out the workaround. In my case, It works well as intended on Android devices.

I hope this helps.

constructor(props: Props) {
  super(props);
  this.state = {
    isVisible: false,
  };
}

componentDidMount() {
  requestAnimationFrame(() => {
    this.setState({
      isVisible: true,
    });
  });
}

render() {
  if (!this.state.isVisible) {
    return null;
  }

  return (
    <View style={styles.container}>
      <Progress.Circle
        size={52}
        progress={0.5}
        unfilledColor="#fff"
        color="#ff457f"
        thickness={2}
        borderWidth={0}
      >
      </Progress.Circle>
    </View>
  );
}

returning null didn't work, but I used an ActivityIndicator and it worked. Thank you!

iAlirezaKML avatar Dec 05 '18 18:12 iAlirezaKML

I found out the workaround. In my case, It works well as intended on Android devices.

I hope this helps.

constructor(props: Props) {
  super(props);
  this.state = {
    isVisible: false,
  };
}

componentDidMount() {
  requestAnimationFrame(() => {
    this.setState({
      isVisible: true,
    });
  });
}

render() {
  if (!this.state.isVisible) {
    return null;
  }

  return (
    <View style={styles.container}>
      <Progress.Circle
        size={52}
        progress={0.5}
        unfilledColor="#fff"
        color="#ff457f"
        thickness={2}
        borderWidth={0}
      >
      </Progress.Circle>
    </View>
  );
}

I applied your solution, but the issue sometime appear for me, any idea?

YahiaJabeur avatar Mar 07 '19 15:03 YahiaJabeur

same issue with RN 0.59.5.

<Progress.Circle /> display with the black square, but ios fine.

ddthuan87 avatar Apr 26 '19 05:04 ddthuan87

I'm using this with the latest Expo v32.0.0 which is using React Native 0.57 but don't seem to face this issue.

zanechua avatar Apr 30 '19 08:04 zanechua

Any fix for this :(?

ckOfor avatar Jul 12 '19 06:07 ckOfor

I can't fix it, it is so weird, and all the solutions above didn't work. So i give up. In my condition, i just wrote it with two views instead —— use borderWidth, borderRadius, AnimatedView. It worked.

x330650779 avatar Dec 22 '19 17:12 x330650779

@x330650779 please share your solution

ckOfor avatar Nov 04 '21 10:11 ckOfor

@ckOfor The issue came back in version 5.0.0 but then was fixed in version 5.0.1

jblemee avatar Nov 27 '23 20:11 jblemee