bug in android on ActivityIndicator!!
See original GitHub issuewhen init the ActivityIndicator 's animating
atrribute to be false , it will never be show if you rerender it .
here is source code
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
ActivityIndicator,
View
} from 'react-native';
export default class AwesomeProject extends Component {
constructor(){
super()
this.state = {
isloading:false,
}
}
render() {
return (
<View style={{flex:1}}>
<Text onPress={()=>{
this.setState({isloading:!this.state.isloading })
}}>
click-isloading</Text>
<ActivityIndicator animating={this.state.isloading}/>
</View>
);
}
}
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
android 6.1 ,reactnative 0.39 ,the latest version
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
React Native ActivityIndicator not displaying - Stack Overflow
The problem is, it doesn't show the ActivityIndicator . Everything else is appearing. Tested both in real mobile device (Redmi Note 7 Pro)...
Read more >Android : React Native ActivityIndicator not displaying - YouTube
Android : React Native ActivityIndicator not displaying [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Android ...
Read more >NativeScript ActivityIndicator Size - YouTube
In this NativeScript tutorial we'll tackle the problem of changing the ... This is a widget that behaves differently on iOS and Android, ......
Read more >ActivityIndicator - NativeScript Docs
ActivityIndicator is an abstraction over Android's ProgressBar and iOS's ... The ActivityIndicator's value could be controlled via its `busy` property.
Read more >ActivityIndicator doesn't work | Telerik Forums
I was attempting to use an ActivityIndicator ... but when I instantiate a ActivityIndicator() object my app crashes on iOS and Android.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yeah,but when i setstate
animating :true
it is still hide . if you initialfalse
it is will never show @johnryanI have met similar bugs. It is not about activity indicator but how the scene is re-rendered. Interesting is that this rnplay works. you can work around it by saying
{this.state.isloading && <ActivityIndicator/>}