123456789101112131415161718192021222324252627282930313233343536 |
- import React from 'react';
- import {
- ActivityIndicator,
- StyleSheet,
- View,
- } from 'react-native';
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: 'center',
- },
- horizontal: {
- flexDirection: 'row',
- justifyContent: 'space-around',
- padding: 10,
- },
- });
- class App extends React.Component {
- render() {
- return (
- // - size as a number is only valid on Android (actually crashes, though)
- // - color defaults to 'gray', supports #xxxx, rgb(), rgba(), hsl(), hsla()
- // - hidesWhenStopped only works on iOS.
- <View style={[styles.container, styles.horizontal]}>
- <ActivityIndicator size="large" color="#0000ff" />
- <ActivityIndicator size="small" color="#00ff00" hidesWhenStopped={false} animating={false} />
- <ActivityIndicator size="small" color="red" />
- <ActivityIndicator size="large" color="#0002" />
- </View>
- );
- }
- }
- export default App;
|