ReactNative ActivityIndicator not showing when animating property initiate false

后端 未结 10 1590

I\'m playing with react native and got a strange behaviour.

When I try to show a ActitvityIndicator for Android setting its animating property

10条回答
  •  别跟我提以往
    2021-02-12 22:12

    This is a bug of React-Native for component Activity Indicator. I am not sure that fb has already solved it but you can try this

     constructor(props) {
            super(props);
            this.state = {
                opacity: 0
            };
        }
    

    to show it use this.setState({opacity:1}) and to hide again this.setState({opacity:0}) in your called functions

    and in the render where you are using activity indicator

     
    

提交回复
热议问题