RN组件之ListView
/**
* 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的更多相关文章
- 第29讲 UI组件之 ListView与 BaseAdapter,SimpleAdapter
第29讲 UI组件之 ListView与 BaseAdapter,SimpleAdapter 1.BaseAdapter BaseAdapter是Android应用程序中经常用到的基础数据适配器,它的 ...
- 第28讲 UI组件之 ListView和ArrayAdapter
第28讲 UI组件之 ListView和ArrayAdapter 1. Adapter 适配器 Adapter是连接后端数据和前端显示的适配器接口,是数据和UI(View)之间一个重要的纽带.在常见的 ...
- Android常见UI组件之ListView(二)——定制ListView
Android常见UI组件之ListView(二)--定制ListView 这一篇接上篇.展示ListView中选择多个项及实现筛选功能~ 1.在位于res/values目录下的strings.xml ...
- RN组件备忘录
1:ActivityIndicator:圆形的loading提示符号. 2:Button:按钮 3:FlatList:高性能列表组件,支持下拉刷新. 4:Image:图片组件,能显示 网络图片.静态资 ...
- React Native常用组件之ListView组件
学习iOS开发的同学应该都知道UITableView,几乎每个APP中都有它的存在,而且衍生出各种形态:那么同样,ListView就是在React Native中的tableView,而且更加简单和灵 ...
- Android 高级UI设计笔记01:使用ExpandableListView组件(ListView的扩展)
1.ExpandableListView是一个用来显示二级节点的ListView. 比如如下效果的界面: 2.使用ExpandableListView步骤 (1)要给ExpandableListVie ...
- [置顶] 安卓UI组件之ListView详解
ListView是很常见的一个UI组件,在许多App中都很常用,其意思就是可滚动的列表,使用ListView必须使用Adapter(适配器),常用的适配器友谊ArrayAdapter,SimpleAd ...
- React Native常用组件之ListView
1. ListView常用属性 ScrollView 相关属性样式全部继承 dataSource ListViewDataSource 设置ListView的数据源 initialListSize n ...
- RN中关于ListView的使用
1. ListView dataSource 介绍: ListView需要指定数据的来源.传入数据必须是数组,或者是字典里面嵌套数组 系统会根据你传入的数据自动生成section和row 每一个字典的 ...
随机推荐
- Linux命令之exit - 退出当前shell【返回值状态】
原文链接:http://codingstandards.iteye.com/blog/836625 (转载请注明出处) 用途说明 exit命令用于退出当前shell,在shell脚本中可以终止当前 ...
- tmux简单使用指南
一, ubuntu安装tmux sudo apt-get install tmux 二, tmux使用 1)打开shell,输入命令tmux,,shell下边会出现绿色状态条 2)然后同时按下ctrl ...
- iOS 定制controller过渡动画 ViewController Custom Transition使用体会
最近学习了一下ios7比较重要的一项功能,就是 controller 的 custom transition. 在ios7中,navigation controller 中就使用了交互式过渡来返回上级 ...
- 4.前端笔记之jsdom基础
一.简介 文件对象模型(Document Object Model,简称DOM),是W3C组织推荐的处理可扩展标志语言的标准编程接口.DOM编程: DOM 是关于如何获取.修改.添加或删除 HTML ...
- codeforces 489A.SwapSort 解题报告
题目链接:http://codeforces.com/problemset/problem/489/A 题目意思:给出一个 n 个无序的序列,问能通过两两交换,需要多少次使得整个序列最终呈现非递减形式 ...
- ubuntu下Tomcat7的安装和配置
和前几个软件一样,Tomcat 同样是由JAVA开发的,所以,在安装前一定要装好JDK. 大家可以到 http://tomcat.apache.org/download-70.cgi 下载最新的Tom ...
- java\c程序的内存分配
JAVA 文件编译执行与虚拟机(JVM)介绍 Java 虚拟机(JVM)是可运行Java代码的假想计算机.只要根据JVM规格描述将解释器移植到特定的计算机上,就能保证经过编译的任何Java代码能够在该 ...
- 【xml】python的lxml库使用
1.官方教程:http://lxml.de/tutorial.html#parsing-from-strings-and-files 最重要的文档,看完基本就能用了 2.lxml支持xpath,xp ...
- ios获取一个文件夹下的文件(夹)列表
NSArray* ary=[[NSFileManager defaultManager] contentsOfDirectoryAtPath:[[NSBundle mainBundle] pathFo ...
- linux常见问题集锦-2
http://zhangge.net/1986.html 在此感谢作者分享 1.linux如何挂在windows下的共享目录 Shell 1 mount.cifs //192.168.1.3/serv ...