@wuye/react-native-subsampling-scale-image
v1.0.15
Published
android subsampling scale image view
Downloads
13
Maintainers
Readme
subsampling-scale-image-view react-native版,用于解决android加载长图模糊问题
Installation
npm install @wuye/react-native-subsampling-scale-image
yarn add @wuye/react-native-subsampling-scale-image
Usage
import { SubsamplingScaleImage } from "@wuye/react-native-subsampling-scale-image";
// ...
<SubsamplingScaleImage
zoomEnabled
panEnabled
quickScaleEnabled
maxScale={3}
minScale={1}
doubleTapZoomStyle={DoubleTapZoomStyle.ZOOM_FOCUS_FIXED}
source={{ uri: props.uri }}
onLoadStart={() => console.log('onLoadStart')}
onLoad={event => console.log('onLoad', event.nativeEvent)}
onLoadEnd={() => console.log('onLoadEnd')}
onLoadCleared={() => console.log('onLoadCleared')}
onError={() => console.log('onError')}
onScaleChanged={event =>
console.log('onScaleChanged', event.nativeEvent)
}
onCenterChanged={event =>
console.log('onCenterChanged', event.nativeEvent)
}
style={{
width: props.width,
height: props.height,
overflow: 'visible',
}}
/>
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT