Skip to content

A pure js image animation like ios animationImages, support ios and android

License

Notifications You must be signed in to change notification settings

heretse/react-native-image-animation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native ImageAnimation

A pure js image animation like ios animationImages, support iOS and Android

Installation

npm install react-native-image-animation --save

Usage

Example

import { ImageAnimation } from 'ImageAnimation';

...

var imageView = <ImageAnimation
                    ref={() => this._powerBtn = this}
                    resizeMode='stretch'
                    animationRepeatCount={25}
                    animationDuration={100}
                    animationImages={[
                        require('image!animation_progress_status_1'),
                        require('image!animation_progress_status_2'),
                        require('image!animation_progress_status_3'),
                        require('image!animation_progress_status_4'),
                        require('image!animation_progress_status_5'),
                        require('image!animation_progress_status_6'),
                        require('image!animation_progress_status_7'),
                        require('image!animation_progress_status_8'),
                        require('image!animation_progress_status_9'),
                        require('image!animation_progress_status_10'),
                        require('image!animation_progress_status_11'),
                        require('image!animation_progress_status_12')
                    ]}
                    onTimeout={this._handleTimeout.bind(this)}
                    style={{width: 35, height: 35}} />

Screencasts

loading

Props

This module supports react-native Image's props all.

Animation Props
  • animationImages : PropTypes.array.isRequired - animation Images Array
  • animationRepeatCount : PropTypes.number - 0 for forever
  • animationDuration : PropTypes.number - default is 1000(ms)
  • onTimeout : PropTypes.func

About

A pure js image animation like ios animationImages, support ios and android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%