【问题标题】:react-native ActivityIndicator in AndroidAndroid 中的 react-native ActivityIndi​​cator
【发布时间】:2018-05-30 16:22:37
【问题描述】:

我正在尝试将 ActivityIndi​​cator 添加到我的 react-native 应用程序中。
在 IOS 中运行良好,在 Android 模拟器中也是如此。
但在真正的 Android 设备中它不起作用。

我的尝试:

import React, { Component } from 'react';
import { ActivityIndicator } from 'react-native';

class Spinner extends Component {
  constructor(props) {
    super(props);
  }

  render() {
    return (
      <View>
        <ActivityIndicator
          size="large"
          animating
        />
      </View>
    );
  }
}

export default Spinner;

【问题讨论】:

    标签: javascript android react-native


    【解决方案1】:

    尝试在视图中添加 style={{flex:1, alignItems:'center', justifyContent:'center'}}

    【讨论】:

    • 请添加此内容并尝试一次。动画={true}
    • 我在两个三个设备上试过它的工作。你能在另一台设备上登记吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-10
    • 2021-09-04
    • 1970-01-01
    • 2018-04-14
    • 2019-04-05
    • 1970-01-01
    相关资源
    最近更新 更多