react-native
26yl
这个作者很懒,什么都没留下…
展开
-
android 原生项目集成react-native的坑
集成方法react-native 中文http://reactnative.cn/docs/0.47/integration-with-existing-apps.html#content 这里的版本比较老,没有测试成功Android原生项目集成React Native React Native 实现热部署、差异化增量热更新遇得到的坑unable to load script from asse原创 2017-09-13 17:30:08 · 232 阅读 · 0 评论 -
react-native 代码片段
**1.带参数的点击回调**onPress={this.props.onPress.bind(this,i)}onPress={(i) => { ToastAndroid.show("===>" + i, ToastAndroid.SHORT) }}2.圆形图片设置style circle:{ alignI原创 2017-09-18 10:20:39 · 543 阅读 · 0 评论 -
react-native imageButton 可设置默认图片,避免加载失败空白
import React, {Component} from 'react';import {TouchableOpacity, Image} from 'react-native';export default class ImageButton extends Component { render() { return ( <TouchableO原创 2017-09-11 11:10:57 · 3099 阅读 · 0 评论 -
react-native titleBar
import React, {Component} from 'react';import { Image, StyleSheet, Text, View,} from 'react-native';import {Header} from "native-base"import {images} from "../../resource/";import原创 2017-09-05 17:47:13 · 524 阅读 · 0 评论 -
react-native 中NativeBase框架500错误
Unable to resolve module `react-native/Libraries/Renderer/shims/ReactNativePropRegistry` from `........./node_modules/native-base/dist/src/Utils/computeProps.js`NativeBase版本冲突,解决: https://github.com/G原创 2017-09-01 10:09:35 · 2317 阅读 · 0 评论 -
react-native image 设置默认图片
Image在加载网络失败后图片位置就是空白的,好像官方api没有提供对应的默认图片设置方法,所以就找了个笨办法,在image外面嵌套一层image用来展示默认图片,有更好的解决方案也给我说说import React, {Component} from 'react';import {TouchableOpacity, Image} from 'react-native';export defau原创 2017-09-08 18:01:47 · 4210 阅读 · 1 评论 -
react-native android编译报错
报错信息FAILURE: Build failed with an exception.* What went wrong:A problem occurred configuring project ':app'.> SDK location not found. Define location with sdk.dir in the local.properties file or with原创 2017-08-30 09:26:42 · 514 阅读 · 0 评论 -
react-native react-native-swiper 设置horizontal=false无效
react-native react-native-swiper 设置horizontal=false后界面依然横向滑动, 主要是对布局进行了旋转操作export default class TestSwiper extends Component { render(){ return ( <View style={styles.containe原创 2017-09-07 10:33:46 · 2395 阅读 · 1 评论 -
基于react-native-swiper 封装的bannerView
使用 <BannerView defaultImage={constants.default_img} images={this.state.bannerData} bannerHeight={150} itemOnPress={(i) => {原创 2017-09-13 17:52:39 · 724 阅读 · 0 评论 -
ReactNative组件整理
一年前整理的,可能有变化原创 2018-09-06 17:29:45 · 144 阅读 · 1 评论