react native ListView的嵌套(第一层listview的item也是一个listview)

本文介绍如何在React Native中实现ListView的嵌套,分享了一个初学者的研究过程。内容包括如何在第一层ListView的每个item中嵌套另一个ListView,虽然代码质量有待优化,但可供参考学习。
摘要由CSDN通过智能技术生成

//我也是初学者 接触才一个月 工作中需要什么 学什么。。。 

//当初需要这个功能 然后网上找Demo没找到 只好自己研究了下

//代码质量比较差 还在继续学习优化中 见谅!




import React, { Component } from 'react';

import { StackNavigator, TabBarTop, TabNavigator } from 'react-navigation';
import Constants from '../common/Constants'


import {
  AppRegistry,
  StyleSheet,
  View,
  Text,
  ListView,
  Image,
  Platform,
  TouchableOpacity,
  TouchableHighlight
} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import User from '../common/User';
import callOnceInInterval from '../common/CallOnceInInterval'


const checkImage = require('../image/icon/checkbox.png');
const checkedImage = require('../image/icon/check-symbol.png');





export default class QuestionsZero extends Component {


  constructor(props) {
    super(props);
    this.user = new User();
    this.state = {
      data:null,
      dataSource: null
    };
  }
  static navigationOptions = {
          // title:标题,如果设置了这个导航栏和标签栏的title就会变成一样的,不推荐使用
          // header:可以设置一些导航的属性,如果隐藏顶部导航栏只要将这个属性设置为null
          // headerTitle:设置导航栏标题,推荐
          // headerBackTitle:设置跳转页面左侧返回箭头后面的文字,默认是上一个页面的标题。可以自定义,也可以设置为null
          // headerTruncatedBackTitle:设置当上个页面标题不符合返回箭头后的文字时,默认改成"返回"
          // headerRight:设置导航条右侧。可以是按钮或者其他视图控件
          // headerLeft:设置导航条左侧。可以是按钮或者其他视图控件
          // headerStyle:设置导航条的样式。背景色,宽高等
          // headerTitleStyle:设置导航栏文字样式
          // headerBackTitleStyle:设置导航栏‘返回’文字样式
          // headerTintColor:设置导航栏颜色
          // headerPressColorAndroid:安卓独有的设置颜色纹理,需要安卓版本大于5.0
          // gesturesEnabled:是否支持滑动返回手势,iOS默认支持,安卓默认关闭 <
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值