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 每一个字典的 ...
随机推荐
- TortoiseSVN中图标的含义
今天在使用svn时发现有好多不认识了,所以查了下svn帮助手册.借此总结了下 svn 中图标的含义 一个新检出的工作复本使用绿色的勾做重载.表示Subversion状态 正常. 在开始编辑一个文件后, ...
- 【SpringMVC】SpringMVC系列4之@RequestParam 映射请求参数值
4.@RequestParam 映射请求参数值 4.1.概述 Spring MVC 通过分析处理方法的签名,将 HTTP 请求信息绑定到处理方法的相应人参中.Spring MVC 对控制器处理 ...
- Jump Game | & ||
Jump Game | Given an array of non-negative integers, you are initially positioned at the first index ...
- iOS 查看系统字体效果的网页
常常需要查看字体的样式,这里推荐一个网页http://iosfonts.com,方便查阅.
- Java for LeetCode 145 Binary Tree Postorder Traversal
Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary ...
- codeforces A. Candy Bags 解题报告
题目链接:http://codeforces.com/contest/334/problem/A 题意:有n个人,将1-n袋(第 i 袋共有 i 颗糖果,1<= i <=n)所有的糖 ...
- [Android Pro] Android Support 包里究竟有什么
reference to : http://www.2cto.com/kf/201411/350928.html 随着 Android 5.0 Lollipop 的发布,Android 又为我们提供了 ...
- 电话连线(codevs 1003)
题目描述 Description 一个国家有n个城市.若干个城市之间有电话线连接,现在要增加m条电话线(电话线当然是双向的了),使得任意两个城市之间都直接或间接经过其他城市有电话线连接,你的程序应该能 ...
- python基础——列表生成式
python基础——列表生成式 列表生成式即List Comprehensions,是Python内置的非常简单却强大的可以用来创建list的生成式. 举个例子,要生成list [1, 2, 3, 4 ...
- cf50A(水题)
题意:m*n的地板最多能铺多少2*1的地板砖,不能重复... 水题.. 上代码... #include <iostream> #include <stdio.h> using ...