React Native开源图片缩放处理组件
2016-05-05 16:29
519 查看
[译]React Native开源图片缩放处理组件(react-native-image-zoom)
2016/04/05 | ReactNative组件资源,外文翻译 | Sky丶清| 暂无评论 | 1551
views
尊重版权,转载请注明出处
本文来自:江清清的技术专栏-翻译组(http://www.lcode.org)
翻译计划项目:https://github.com/jiangqqlmj/js-coach-cn
开源项目地址:https://github.com/Anthonyzou/react-native-image-zoom
项目介绍
该组件进行封装了Android平台PhotoView和Universal-image-loader组件,进行实现图像缩放等功能。不过只是适配Android平台
刚创建的React Native技术交流3群(496508742)欢迎各位大牛,React Native技术爱好者加入交流!
配置安装
1.1.路径切换到项目根目录,运行如下命令进行安装组件,点击进入实例代码
?
?
1.3.在android/app/build.gradle文件做如下依赖设置(:react-native-image-zoom)
?
?
属性介绍
属性 | 类型 | 默认值 | 介绍 |
---|---|---|---|
souce | Object | null | same as the react image format source={{uri:'http...'}} or source={require('./...')} |
tintColor | string | null | optional tintColor |
scale | float | null | optional scale amount |
scaleType | string | null | one of center, centerCrop, centerInside, fitCenter, fitStart, fitEnd, fitXY, matrix |
onTap | function | null | optional on tap listener |
onLoad | function | null | optional on load listener |
实例演示
?
相关文章推荐
- reactnative滑动删除
- React Native控件之Switch开关与Picker选择器组件讲解以及使用
- reactnative报表
- [转] react-native 之布局篇
- react native 图标字体
- react-native 之布局篇
- reactNative白屏优化
- React-Native的项目总结
- react-native 版本更新
- React Diff剖析
- React原理
- react-native报错解决方法 in next release empty section headers will be rendered
- React 官网列子学习
- 整理了一份React-Native学习指南
- ReactNative真机调试
- React中prop和state的区别
- windows 下配置 react native 开发环境
- React Native 红屏问题的解决
- ReactNative学习 第一节
- React-Native设置入口组件的问题,新手需注意