/**
* Created by DaGuo on 2016/4/7.
*/ 'use strict' import React,{
Component,
View,
Text,
ListView, } from 'react-native'; class ListViewDemo extends Component {
constructor (props){
super(props);
let ds=new ListView.DataSource({rowHasChanged:(r1,r2) => r1!=r2});
this.state={
dataSoure:ds.cloneWithRows(['row1','row2']),//返回的也是一个ListView
};
}
componentWillMount (){ }
componentDidMount (){
//这里可以异步加载数据或者setTimeout();
}
_renderRow (rowData){ }
render (){
return (
<ListView
dataSource={this.state.dataSource}
renderRow={this._renderRow(rowData)}
initialListSize={300}
onChangeVisibleRows={}
onEndReached={}
onEndReachedThreshold={}
pageSize={}
removeClippedSubViews={{overflow:"hidden"}}
renderFooter={() => renderable}
renderHeader={}
renderScrollComponent ={(props) => renderable}
renderSectionHeader = {}
renderSeparator= {}
scrollRenderAheadDistance ={}
> </ListView>
);
} }

RN组件之ListView的更多相关文章

  1. 第29讲 UI组件之 ListView与 BaseAdapter,SimpleAdapter

    第29讲 UI组件之 ListView与 BaseAdapter,SimpleAdapter 1.BaseAdapter BaseAdapter是Android应用程序中经常用到的基础数据适配器,它的 ...

  2. 第28讲 UI组件之 ListView和ArrayAdapter

    第28讲 UI组件之 ListView和ArrayAdapter 1. Adapter 适配器 Adapter是连接后端数据和前端显示的适配器接口,是数据和UI(View)之间一个重要的纽带.在常见的 ...

  3. Android常见UI组件之ListView(二)——定制ListView

    Android常见UI组件之ListView(二)--定制ListView 这一篇接上篇.展示ListView中选择多个项及实现筛选功能~ 1.在位于res/values目录下的strings.xml ...

  4. RN组件备忘录

    1:ActivityIndicator:圆形的loading提示符号. 2:Button:按钮 3:FlatList:高性能列表组件,支持下拉刷新. 4:Image:图片组件,能显示 网络图片.静态资 ...

  5. React Native常用组件之ListView组件

    学习iOS开发的同学应该都知道UITableView,几乎每个APP中都有它的存在,而且衍生出各种形态:那么同样,ListView就是在React Native中的tableView,而且更加简单和灵 ...

  6. Android 高级UI设计笔记01:使用ExpandableListView组件(ListView的扩展)

    1.ExpandableListView是一个用来显示二级节点的ListView. 比如如下效果的界面: 2.使用ExpandableListView步骤 (1)要给ExpandableListVie ...

  7. [置顶] 安卓UI组件之ListView详解

    ListView是很常见的一个UI组件,在许多App中都很常用,其意思就是可滚动的列表,使用ListView必须使用Adapter(适配器),常用的适配器友谊ArrayAdapter,SimpleAd ...

  8. React Native常用组件之ListView

    1. ListView常用属性 ScrollView 相关属性样式全部继承 dataSource ListViewDataSource 设置ListView的数据源 initialListSize n ...

  9. RN中关于ListView的使用

    1. ListView dataSource 介绍: ListView需要指定数据的来源.传入数据必须是数组,或者是字典里面嵌套数组 系统会根据你传入的数据自动生成section和row 每一个字典的 ...

随机推荐

  1. Intersection of Two Arrays | & ||

    Intersection of Two Arrays Given two arrays, write a function to compute their intersection. Example ...

  2. Nth to Last Node in List

    Find the nth to last element of a singly linked list. The minimum number of nodes in list is n. Exam ...

  3. jQuery结合Ajax实现简单的前端验证和服务端查询

    上篇文章写了简单的前端验证由传统的JavaScript转向流畅的jQuery滑动验证,现在拓展一下,使用Ajax实现用户体验比较好的异步查询,同样还是从建立一个简单的表单开始 <form nam ...

  4. Androidi性能优化之多线程和同步

    线程: 创建线程的方法: a:定义Thread类的实例,并start(); b:实现Runnable接口,并作为参数传给Thread类的实例,然后start(); 不管线程是通过什么方式创建的,它都有 ...

  5. eoe项目结构

    ├ cn.eoe.app –存放程序全局性类的包├ cn.eoe.app.adapter –存放适配器的实现类的包 ├ cn.eoe.app.adapter.base –存放适配器基类的包├ cn.e ...

  6. 学习配置vsftp 进行ftp文件的传输

    一. FTP 说明 linux 系统下常用的FTP 是vsftp, 即Very Security File Transfer Protocol. 还有一个是proftp(Profession ftp) ...

  7. 解决zabbix图中出现中文乱码问题 图中的中文会变成方块

    [root@node03 src]# wget http://down1.chinaunix.net/distfiles/ttf-arphic-uming_0.0.20050501-1.tar.gz ...

  8. jquery easy ui 1.3.4 布局layout(4)

    4.1.easyui布局-layout 在easyui里面只有一种布局方式,layout(东.南.西.北.中)的布局方式,创建layout布局的方式如下: <div id="cc&qu ...

  9. Java Hour 50 日期类型

    Plan List: 1 Java 中的日期类型 2 mysql 相关 3 java code style 鉴于本问题太过普通,所以参考文章满大街都是,因此本文内容基本为转载和验证. java.sql ...

  10. wp8 ListPicker

    如何给selectedindex 绑定SelectedIndex="{Binding User.StationWorkFlag}"  这样写不对嘛 为何提示我 SelectedIn ...