How to use react-native-progress - 9 common examples

To help you get started, we’ve selected a few react-native-progress examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github N3TC4T / Nearby-Live / src / components / ui / Image.js View on Github external
import RNFetchBlob from 'react-native-fetch-blob';
import * as Progress from 'react-native-progress';

// components
import {Icon} from '@ui/';
import {Alert} from '@ui/alerts/';

// consts
import {AppSizes, AppStyles} from '@theme/';

// utils
import {backgroundValueCalculation} from '@lib/util';

const AnimatedImage = Animated.createAnimatedComponent(ImageBackground);
const DefaultIndicator = Progress.Circle;

const LAYOUT_ENUM = {
    X: 'x',
    Y: 'y'
};

const BACKGROUND_VALUES = {
    MAX: 100,
    MIN: 0
};

const DOUBLE_TAP_MILISECONDS = 200;

const styles = StyleSheet.create({
    background: {
        position: 'absolute',
github CodeRabbitYu / ShiTu / app / pages / Gank / GankListItem.js View on Github external
{
                    itemData.isImage
                        ?
                        {
                                this.setState({
                                    isFullImage: !this.state.isFullImage,
                                })
                            }}>

                            this._onProgress(e.nativeEvent.loaded,e.nativeEvent.total)}
                            />

                        

                        : null

                }
github CodeRabbitYu / ShiTu / app / pages / Gank / WelfareContainer.js View on Github external
return dataSource.map((item, i) => {
        console.log(item);
        return (
            {
                                      navigate('WelfarePicture',{
                                            title:'图片详情',
                                            url:item.largeUrl,
                                            isVisible:true
                                        });
                                  }}
            >
                <img style="{{">
            
        );
    }, this);
};
github oblador / react-native-image-progress / Example / App.js View on Github external
import React, { Component } from 'react';
import { StyleSheet, TouchableOpacity, View } from 'react-native';

import Image from 'react-native-image-progress';
import * as Progress from 'react-native-progress';

const INDICATORS = [null, Progress.Bar, Progress.Circle, Progress.Pie];

const IMAGES = [
  'http://www.savethecat.com/wp-content/uploads/2015/06/cats.jpg',
  'http://media4.popsugar-assets.com/files/2014/08/08/878/n/1922507/caef16ec354ca23b_thumb_temp_cover_file32304521407524949.xxxlarge/i/Funny-Cat-GIFs.jpg',
  'http://media1.santabanta.com/full1/Animals/Cats/cats-87a.jpg',
  'http://awesomegifs.com/wp-content/uploads/cat-smacks-at-hands.gif',
];

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  image: {
github halilb / react-native-photo-browser / lib / media / Photo.js View on Github external
const { progress } = this.state;

    if (progress &lt; 1) {
      if (progressImage) {
        return (
          <img>
        );
      }

      if (Platform.OS === 'android') {
        return ;
      }

      const ProgressElement = useCircleProgress ? Progress.Circle : Progress.Bar;
      return (
        
      );
    }
    return null;
  }
github nashvail / SplashWalls / index.ios.js View on Github external
{wallsJSON.map((wallpaper, index) =&gt; {
          return(
            
          );
        })}
github staltz / dat-installer / src / frontend / screens / central / view.ts View on Github external
function renderLogo(item: AppMetadata) {
  if (item.package) {
    return h(Image, {
      source: {
        uri: `http://localhost:8182/icon/${item.package}.png`,
      },
      style: styles.logo,
    });
  } else {
    return h(Progress.CircleSnail, {
      indeterminate: true,
      size: 40,
      color: palette.mainGreen,
    });
  }
}
github staltz / dat-installer / src / frontend / screens / central / view.ts View on Github external
h(View, { style: styles.appDetails }, [
                renderTitle(item),
                renderSubtitle(item),
              ]),
            ]),
          ]);
        },
      });
    } else {
      return placeholder;
    }
  }
}

const beforeReady = h(View, { style: styles.container }, [
  h(Progress.CircleSnail, {
    style: styles.beforeReadySpinner,
    indeterminate: true,
    size: 100,
    color: palette.mainGreen,
  }),
  h(Text, { style: styles.info }, "Starting up..."),
]);

function renderWhenReady(state: State) {
  return h(View, { style: styles.container }, [
    h(AppList, { selector: "appList", apps: state.apps }),
    h(ActionButton, {
      selector: "addApp",
      buttonColor: "rgb(25, 158, 51)",
    }),
  ]);
github Qolzam / react-mobile-social / app / components / Img / Img.js View on Github external
render() {

    let { fileName, style } = this.props
     return (
          
    )

  }
}

react-native-progress

Progress indicators and spinners for React Native using ReactART

MIT
Latest version published 4 months ago

Package Health Score

72 / 100
Full package analysis