当动画属性为TRUE和opactity 1时,ReactNative ActivityIndi​​cator不显示EVEN

时间:2019-07-16 05:12:12

标签: javascript react-native

我是本机的新手...在提到外部链接之前,我已经搜索过谷歌搜索并阅读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>;
  }
}

1 个答案:

答案 0 :(得分:0)

在开发人员选项中的

andoid设置中,请确保您的

window animation :altlest 1x

transition animation :altlest 1x

animator duration scale  :altlest 1x