
React-native积累
lxq0426
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
react-native 在android运行时报UNEXPECTED TOP-LEVEL EXCEPTION
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION: Unknown source file : com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim; Unknown source file : at com原创 2016-07-22 17:11:19 · 1905 阅读 · 0 评论 -
react-native scrollView 中部分有用事件
在scrollView 中有个onScroll prop,可以实时监听滑动事件,配合属性scrollEventThrottle 来使用,当scrollEventThrottle属性值设置比较低时,对位置比较敏感,会多次触发onScroll,为了保证onScroll只触发一次可以将scrollEventThrottle值调高些,如scrollEventThrottle={200},该属性默认为0,原创 2016-07-06 14:29:50 · 16599 阅读 · 3 评论 -
react_native环境问题
今天把项目移动到自己的电脑上进行开发,竟然出现了: Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find com.android.support:appcompat-v7:23.0.1. Searched in the following locations:原创 2016-07-09 10:18:41 · 3151 阅读 · 1 评论 -
react-native中使用underscore
underscore 是一个非常方便的js工具类,今天刚好碰到一个需要判定对象是否相等的逻辑,自己写起来有点麻烦,发现这个很好用的工具类,开源的,就拿来用了。 在react-native 中使用,直接在项目里用命令: npm install underscore 进行该模块的下载,无需什么配置,在需要的js页面里使用: const _ =require('underscore'原创 2016-11-30 22:04:56 · 1602 阅读 · 0 评论 -
react-Native ListView中实现单击行展开效果
大致思路挺简单的: 1、展开效果可以通过Animated动画来实现,思路大致为,给Animated高度为0,当单击时Animated展开一定高度,这样就完成了展开的效果 2、ListView是以单个显示元素来累积起来的,所以可以写一个组件,主要包含listView中显示部分和隐藏部分(即需要单击展开收起部分)。 测试代码如下: 自定义listView单个元素组件,包含可原创 2016-10-25 01:05:20 · 7315 阅读 · 2 评论 -
react-native-webview-bridge使用问题
1.在github上将该三方插件集成到自己项目中,具体参考:https://github.com/alinz/react-native-webview-bridge 在个人当前试用版会导致不兼容,修改:node_modules\react-native-webview-bridge\webview-bridge\index.android.js 头部: import React, {原创 2016-07-09 14:50:14 · 6747 阅读 · 4 评论