react-native-bigimageviewer – Big image viewer supporting pan and zoom

react native Big image viewer supporting pan and zoom, with very little memory usage and full
featured image loading choices. Powered by
Glide

Installation

yarn add react-native-bigimageviewer
// android/build.gradle

allprojects {
    repositories {
       maven {
         url  "http://dl.bintray.com/piasy/maven"
       }
       ...
    }
}

Note: please put this download url at the first of your repositories part, otherwise, gradle may search in wrong place.

example

Usage

import BannerView from 'react-native-bigimageviewer';
// ...

<BannerView
        {...imageProps}
        style={styles.image}
        source={
          'https://4youscan.xyz/wp-content/uploads/2020/08/005-2537-900x1280.jpg'
        }
        resizeMode={'fitCenter'}
        loading={true}

/>

props

type resizeMode =
  | 'center'
  | 'centerCrop'
  | 'centerInside'
  | 'fitCenter'
  | 'fitEnd'
  | 'fitStart'
  | 'fitXY'
  | 'start';

interface imageProps {
  source: string;
  loading?: boolean;
  resizeMode?: resizeMode;
  style?: StyleProp<ImageStyle>;
  onCacheHit?: Function;
  onCacheMiss?: Function;
  onStart?: Function;
  onProgress?: Function;
  onFinish?: Function;
  onSuccess?: Function;
  onFail?: Function;
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Author: admin

Leave a Reply

Your email address will not be published.