属性
- size:设置滚轮的大小
large
small
,默认是small
在android中可以设置数字:size={75}
- color:设置滚轮的颜色,默认是
white
- animating:是否要显示指示器动画,默认为true表示显示,false则隐藏
- hidesWhenStopped(IOS):在animating为 false 的时候,是否要隐藏指示器(默认为 true)。如果animating和hidesWhenStopped都为 false,则显示一个静止的指示器
代码
<ActivityIndicator
animating={this.state.animating}
/**
* transform: scale 放大比例
* backgroundColor:设置背景色
*/
// style={[styles.centering,{flex:1,backgroundColor:'gray',transform:[{scale:5}]}]}
size= 'large'
color= 'red'
/>