react-native ScrollView的简单应用
来源:互联网 发布:魔兽世界7.0掉落数据库 编辑:程序博客网 时间:2024/06/15 16:39
import React, { Component } from 'react';import { AppRegistry, StyleSheet, Text, View, ScrollView, Dimensions,} from 'react-native';import QuestionItem from './QuestionItem';var questionData = { title:"1.根据我们所学的正、负数的知识,请回答:海水涨了-4cm的意义 ( )", select1:"(A)海水涨了4cm", select2:"(B)海水下降了4cm", select3:"(C)海水水位没有变化", select4:"(D)海水上涨或下降的数字是个相对值,因此不存在负数的说法",}class Question extends Component { constructor(props) { super(props); this.state = {dataArray: []}; this.fetchData(); } render() { return ( { this.state.dataArray.map((item, i) => this.renderQuestionItem(item, i)) } ); } renderQuestionItem(item, i) { return } fetchData() { for (let i = 0;i < 10;i++) { this.state.dataArray.push(questionData); } }}const styles = StyleSheet.create({ scrollView: { flex: 1, backgroundColor: '#F5FCFF', width:Dimensions.get('window').width, margin:5, },});AppRegistry.registerComponent('Hello', () => Question);
0 1
- react-native ScrollView的简单应用
- React Native零碎笔记一:ScrollView的简单应用
- React Native之 ScrollView
- react-native之ScrollView
- React Native 之 ScrollView
- react-native的简单使用
- React Native简单的APP
- React Native 简单的组件
- react-native 简单的react-redux创建
- react-native-baidu-map简单应用
- React Native 之 ScrollView使用
- React native (6) scrollview listview
- react native ScrollView 使用详解
- React Native scrollview滚动事件
- React Native ScrollView 常用属性
- React Native 之 ScrollView使用
- 浅谈react native中的ScrollView
- react native ScrollView滚动不起作用
- Intellij 强制更新快照版jar包
- 转载:TreeSet详解
- 路径问题系列之 POJ 1915 Knights Moves(BFS)
- uva10305 拓扑排序
- 大多数人不了解HTML5时代的网页设计
- react-native ScrollView的简单应用
- 月相的研究
- 注册 Gmail,验证手机号码的时候提示“此号码不能用于验证”,怎么解决?
- GetHashCode 要你到底何用
- oracle 子父表关联查询以父表作为查询分页对象
- lua cocos2dx UIManager
- STM32-待机唤醒实验
- ajax GET 演示
- 应用alert 判断json还是json字符串