我是本机的新手...在提到外部链接之前,我已经搜索过谷歌搜索并阅读ReactNative ActivityIndicator not showing when animating property initiate false和错误... 在那里尝试了大多数东西。 我将动画属性设置为TRUE和opactity 1 ..请您帮忙
import React, { Component } from 'react';
import { StyleSheet, Text, View, ActivityIndicator, Button } from 'react-native';
export default class Login extends Component {
onPressLearnMore = () => {
alert(5);
}
render() {
return <View >
<Button
onPress={this.onPressLearnMore}
title="Learn More"
color="#841584"
accessibilityLabel="Learn more about this purple button"
/>
<ActivityIndicator size="small" color="#00ff00" animating={true} style={
{
alignItems: 'center',
justifyContent: 'center',
opacity: 1.0,
height: 200,
}} />
<Button
onPress={this.onPressLearnMore}
title="Learn More"
color="#841584"
accessibilityLabel="Learn more about this purple button"
/>
</View>;
}
}
答案 0 :(得分:0)
andoid设置中,请确保您的
window animation :altlest 1x
transition animation :altlest 1x
animator duration scale :altlest 1x